> This page is for Agent Handler.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.merge.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.merge.dev/_mcp/server.

# Clay

**Authentication:** API key. See [Magic Link](/merge-agent-handler/features/magic-link) for the runtime auth flow.

## Sample use cases

* Enrich a list of target accounts with headcount and funding data before an outbound campaign.
* Search Clay's people database for VPs of Engineering at companies in your ICP.
* Pull rows from the `Warm Leads` workspace table and sync qualified ones to the CRM.

## Available Tools

#### get\_current\_user

Get the Clay user and workspace tied to the API key

#### execute\_routine

Run a Clay routine against 1-100 items and get a routine\_run\_id

#### get\_routine\_run

Fetch progress and results for a routine run by routine\_run\_id

#### create\_batch\_upload\_url

Issue a presigned PUT URL for uploading a batch input JSONL file for a routine

#### start\_batch\_run

Start an async batch routine run over a JSONL file already uploaded via create\_batch\_upload\_url

#### get\_batch\_run

Fetch progress and results for a batch run by routine\_run\_id (from start\_batch\_run)

#### list\_search\_fields

List the filter fields available for a search source\_type ('people' or 'companies'), plus Clay's usage guidance and example filter payloads

#### create\_search

Create a people or company search from structured filters

#### run\_search

Run a search created by create\_search and return the next page of matching records

#### query\_tables

Run a structured query across 1-5 Clay tables (Enterprise)