> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Clay Enterprise: Clay Fields

> List the filter fields available for a search source type. Includes SDK V2 guidance, input constraints, response fields, and Deepline credit cost.

List the filter fields available for a search source type.

<Info>
  Tool ID: `clay_fields`
</Info>

## Run this action

Use the TypeScript SDK for a single call. Put `ctx.tools.execute(...)` inside a Play when the call should be durable, scheduled, or run across a CSV.

```ts theme={null}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'clay_fields',
  {
    "source_type": "people"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={null}
deepline tools execute clay_fields --input '{
  "source_type": "people"
}' --json
```

## Example response

The SDK exposes this shape at `result.toolResponse.raw`. Values below are representative.

```json theme={null}
{
  "data": {
    "fields": [
      {
        "name": "Example",
        "type": "example"
      }
    ],
    "guidance": {
      "behavior": [
        "example"
      ],
      "field_guidance": [
        {
          "id": "id_123",
          "text": "example"
        }
      ]
    },
    "source_type": "people"
  }
}
```

Use `deepline tools get clay_fields --json` for the latest machine-readable contract.

## Input reference

Returns every filter field accepted by POST /search/filters-mode for the given source type, including each field's type, description, allowed values, and usage guidance. Call this before creating a search to build valid filters.

| Name                  | Type                      | Required | Default | Details                         |
| --------------------- | ------------------------- | -------- | ------- | ------------------------------- |
| `payload.source_type` | `"people" \| "companies"` | Yes      | —       | Allowed: `people`, `companies`. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Returns every filter field accepted by POST /search/filters-mode for the given source type, including each field's type, description, allowed values, and usage guidance. Call this before creating a search to build valid filters.",
    "properties": {
      "source_type": {
        "type": "string",
        "enum": [
          "people",
          "companies"
        ]
      }
    },
    "required": [
      "source_type"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name                                                         | Type                      | Required | Default | Details                                        |
| ------------------------------------------------------------ | ------------------------- | -------- | ------- | ---------------------------------------------- |
| `result.data`                                                | `object`                  | Yes      | —       | Provider response payload.                     |
| `result.data.fields`                                         | `array`                   | Yes      | —       | —                                              |
| `result.data.fields[].allowed_values`                        | `array`                   | No       | —       | —                                              |
| `result.data.fields[].description`                           | `string`                  | No       | —       | —                                              |
| `result.data.fields[].name`                                  | `string`                  | Yes      | —       | —                                              |
| `result.data.fields[].type`                                  | `string`                  | Yes      | —       | —                                              |
| `result.data.guidance`                                       | `object`                  | Yes      | —       | —                                              |
| `result.data.guidance.behavior`                              | `array`                   | Yes      | —       | —                                              |
| `result.data.guidance.create_examples`                       | `array`                   | No       | —       | —                                              |
| `result.data.guidance.create_examples[].intent`              | `string`                  | Yes      | —       | —                                              |
| `result.data.guidance.create_examples[].request`             | `object`                  | Yes      | —       | —                                              |
| `result.data.guidance.create_examples[].request.filters`     | `record`                  | Yes      | —       | —                                              |
| `result.data.guidance.create_examples[].request.source_type` | `"people" \| "companies"` | Yes      | —       | Allowed: `people`, `companies`.                |
| `result.data.guidance.field_guidance`                        | `array`                   | Yes      | —       | —                                              |
| `result.data.guidance.field_guidance[].fields`               | `array`                   | No       | —       | —                                              |
| `result.data.guidance.field_guidance[].id`                   | `string`                  | Yes      | —       | —                                              |
| `result.data.guidance.field_guidance[].text`                 | `string`                  | Yes      | —       | —                                              |
| `result.data.source_type`                                    | `"people" \| "companies"` | Yes      | —       | Allowed: `people`, `companies`.                |
| `result.meta`                                                | `object`                  | No       | —       | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "fields": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "allowed_values": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "description": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "name",
                "type"
              ],
              "additionalProperties": false
            }
          },
          "guidance": {
            "type": "object",
            "properties": {
              "behavior": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "create_examples": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "intent": {
                      "type": "string"
                    },
                    "request": {
                      "type": "object",
                      "properties": {
                        "filters": {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "source_type": {
                          "type": "string",
                          "enum": [
                            "people",
                            "companies"
                          ]
                        }
                      },
                      "required": [
                        "source_type",
                        "filters"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "intent",
                    "request"
                  ],
                  "additionalProperties": false
                }
              },
              "field_guidance": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "id": {
                      "type": "string"
                    },
                    "text": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "text"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "behavior",
              "field_guidance"
            ],
            "additionalProperties": false
          },
          "source_type": {
            "type": "string",
            "enum": [
              "people",
              "companies"
            ]
          }
        },
        "required": [
          "source_type",
          "fields",
          "guidance"
        ],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Clay Enterprise provider guide](/docs/providers/clay/guide)
* [SDK V2 quickstart](/docs/sdk-v2/quickstart)
* [SDK reference](/docs/sdk-v2/sdk-reference)
* [Run tools across a CSV](/docs/sdk-v2/batch-csv)
