# Deep Phone Check — Defastra

> Conducts a risk assessment and digital lookup for a provided phone number. Returns a risk score indicating if the number is disposable, risky, or safe, along with carrier details, location, and potential social profiles. See the…

- Key: `defastra-deep-phone-check`
- Type: Action (Read-only)
- Version: 0.0.2
- App: Defastra (`defastra`) — https://pipedream.com/apps/defastra.md
- This page (HTML): https://pipedream.com/apps/defastra/actions/deep-phone-check
- Hints: read-only · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/defastra/actions/deep-phone-check/deep-phone-check.mjs

## Description

Conducts a risk assessment and digital lookup for a provided phone number. Returns a risk score indicating if the number is disposable, risky, or safe, along with carrier details, location, and potential social profiles. [See the documentation](https://docs.defastra.com/reference/deep-phone-check)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `timeout` | `string` | No | The timeout parameters allows you to control the response time of the check, allowing you to choose between more detailed results and faster response times. Please read this guide. |
| `label` | `string` | No | A label is any string of text (max. 100 char) that can be attributed to any lookup. They are useful for organizing your data and can be used to search for data in the Observer, or visualize them on the dashboard. |
| `phoneNumber` | `string` | Yes | The phone number to conduct the risk assessment and digital lookup for, in international format. |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "defastra",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "defastra-deep-phone-check",
  arguments: {
    timeout: "Timeout",
    label: "Label",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "defastra-deep-phone-check",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    defastra: { authProvisionId: "apn_xxxxxxx" },
    timeout: "Timeout",
    label: "Label",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "defastra-deep-phone-check",
    "configured_props": {
      "defastra": { "authProvisionId": "apn_xxxxxxx" },
      "timeout": "Timeout",
      "label": "Label"
    }
  }'
```

---

- App: https://pipedream.com/apps/defastra.md · All apps: https://pipedream.com/apps
