Skip to main content
Custom functions are Clay functions your team builds in the Clay UI, then runs from agents, the CLI, MCP, or the API.

What custom functions are good for

  • Team-specific enrichment waterfalls.
  • Account scoring and qualification.
  • Inbound routing and territory logic.
  • CRM hygiene and validation.
  • Repeatable research workflows.
  • Internal tools that need the same Clay logic your GTM team already trusts.

Runs and batch runs

The key distinction is where the function is built:
  • Build and manage the function in the Clay UI.
  • Run and batch-run it programmatically from agents, the CLI, MCP, or API.

Encode Clay functions into business systems

Call custom functions from backend services, queues, and internal tools.

Expose a function

To call a custom function:
  1. Open Functions.
  2. Create or select a function.
  3. Open Details.
  4. Enable the integrations you need, such as API or MCP.
  5. Copy the t_... function id.
  6. Prefix it with function: when you call it from the plugin, CLI, MCP, or API.
Custom function routine ids use the format function:t_....