# Get Definitions — Clearly Defined

> Gets the coordinates for all definitions that match the given pattern in the specified part of the definition. See the documentation.

- Key: `clearly_defined-get-definitions`
- Type: Action (Read-only)
- Version: 0.0.2
- App: Clearly Defined (`clearly_defined`) — https://pipedream.com/apps/clearly-defined.md
- This page (HTML): https://pipedream.com/apps/clearly-defined/actions/get-definitions
- Hints: read-only · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/clearly_defined/actions/get-definitions/get-definitions.mjs

## Description

Gets the coordinates for all definitions that match the given pattern in the specified part of the definition. [See the documentation](https://api.clearlydefined.io/api-docs/#/definitions/get_definitions).

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `pattern` | `string` | No | The string to search for in definition coordinates to get coordinate suggestions |
| `type` | `string` | No | The type of component |
| `provider` | `string` | No | Where the component can be found |
| `namespace` | `string` | No | Many component systems have namespaces. GitHub orgs, NPM namespace, Maven group id, Conda Subdir/Architecture. If your component does not have a namespace, use '-' (ASCII hyphen). |
| `name` | `string` | No | The name of the component you want |
| `license` | `string` | No | The SPDX license identifier |
| `releasedAfter` | `string` | No | The minimum release date for the component. E.g. 2025-01-01 |
| `releasedBefore` | `string` | No | The maximum release date for the component. E.g. 2025-01-01 |
| `minLicensedScore` | `integer` | No | The minimum effective licensed score for the component |
| `maxLicensedScore` | `integer` | No | The maximum effective licensed score for the component |
| `minDescribedScore` | `integer` | No | The minimum effective described score for the component |
| `maxDescribedScore` | `integer` | No | The maximum effective described score for the component |
| `sort` | `string` | No | The field to sort the results by |
| `sortDirection` | `string` | No | The direction to sort the results by |
| `continuationToken` | `string` | No | Used for pagination. Seeded from the results of the previous query |

## 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": "clearly_defined",
      },
    },
  },
)

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: "clearly_defined-get-definitions",
  arguments: {
    pattern: "Pattern",
    type: "Type",
  },
})
```

**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: "clearly_defined-get-definitions",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    clearly_defined: { authProvisionId: "apn_xxxxxxx" },
    pattern: "Pattern",
    type: "Type",
  },
})

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": "clearly_defined-get-definitions",
    "configured_props": {
      "clearly_defined": { "authProvisionId": "apn_xxxxxxx" },
      "pattern": "Pattern",
      "type": "Type"
    }
  }'
```

---

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