# Search Records — Ironclad

> Searches Ironclad repository records using structured filters and/or Ironclad's native formula filter language. Use this to find a record's ID before Get Record, Update Record, or Delete Record. The filter formula operates on property keys…

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

## Description

Searches Ironclad repository records using structured filters and/or Ironclad's native formula filter language. Use this to find a record's ID before **Get Record**, **Update Record**, or **Delete Record**. The `filter` formula operates on property keys in `[brackets]` — run **Describe Workspace** first to see valid property keys. Formula operators: `Equals([prop], 'value')`, `NotEqual([prop], 'value')`, `Contains([prop], 'value')`, `IsEmpty([prop])`, `IsNotEmpty([prop])`, `LessThan([prop], value)` / `LessThanOrEqual([prop], value)`, `GreaterThan([prop], value)` / `GreaterThanOrEqual([prop], value)`, `Date(2026, 1, 1)` (year, month, day), `Today()`, `RelativeDate(Today(), -7, 'days')` (anchor - `Today()` or `Date(...)` -, offset, unit; unit is one of `days`, `weeks`, `months`, `years`), `And(cond1, cond2, ...)`, `Or(cond1, cond2, ...)`. String values support both single and double quotes. Worked examples: find by name `Contains([name], 'Hammond')`; find records with an agreement date in the last 30 days `GreaterThan([agreementDate], RelativeDate(Today(), -30, 'days'))`; find records missing a contract value `IsEmpty([contractValue])`. Record type is not a formula-filterable property — to find vendor agreements or NDAs, set the `types` prop to `vendor_agreement,nda` instead of using `filter`. Example: set `filter` to `Contains([name], 'Hammond')` to find a record by name; returns `{"list": [{"id": "rec_abc123", "name": "Hammond Foundation NDA", "type": "nda"}], "count": 1}`. [See the documentation](https://developer.ironcladapp.com/reference/list-all-records)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `filter` | `string` | No | Ironclad formula filter expression, e.g. Contains([name], 'Hammond'). See the tool description for the full operator list and worked examples. Optional — omit to list records without a formula filter. |
| `types` | `string` | No | Comma-separated record type keys to restrict results to, e.g. nda,vendor_agreement. Obtain valid type keys via Describe Workspace. |
| `lastUpdated` | `string` | No | ISO 8601 date-time — restrict results to records updated at or after this timestamp, e.g. 2026-01-01T00:00:00Z. |
| `sortField` | `string` | No | Field to sort results by. |
| `sortDirection` | `string` | No | Sort direction. Defaults to DESC if sortField is set but this is omitted. |
| `page` | `integer` | No | 0-indexed page of results. Increment and call again if count suggests more results than were returned. |
| `pageSize` | `integer` | No | Number of results per page (1-100). Defaults to Ironclad's standard page size if omitted. |
| `hydrateEntities` | `boolean` | No | Whether to expand referenced entities in each result. Defaults to false. |

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

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: "ironclad-search-records",
  arguments: {
    filter: "Filter",
    types: "Types",
  },
})
```

**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: "ironclad-search-records",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    ironclad: { authProvisionId: "apn_xxxxxxx" },
    filter: "Filter",
    types: "Types",
  },
})

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": "ironclad-search-records",
    "configured_props": {
      "ironclad": { "authProvisionId": "apn_xxxxxxx" },
      "filter": "Filter",
      "types": "Types"
    }
  }'
```

---

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