Skip to main content
Fetch a single routine by id. Returns the full projection — including the input schema and integration access — that the clay routines list view strips.
clay routines get <routineId>

Arguments

ArgumentDescription
routineIdRoutine id, e.g. function:t_abc123. Required.

Output

{
  "id": "function:t_abc123",
  "type": "function",
  "name": "Enrich company",
  "description": "Look up a company by domain.",
  "entityType": "company",
  "access": { "integrations": ["api", "mcp"] },
  "inputSchema": {
    "type": "object",
    "properties": { "domain": { "type": "string" } },
    "required": ["domain"]
  }
}
FieldTypeDescription
idstringRoutine id.
type"function"Routine type. Only function is supported by the current CLI.
namestringDisplay name.
descriptionstring | nullDescription, or null if not set.
entityType"contact" | "company" (optional)MCP entity type. Omitted when not set.
access.integrationsarray of "api" | "mcp" | "claygent"Integrations the routine is exposed on.
inputSchemaobject (optional)JSON Schema for the routine’s input. Omitted when the routine does not declare a schema.

Errors

CodeExitNotes
not_found6No routine with that id in this workspace.
auth_forbidden3The API key lacks the cli:all scope (or all).

Examples

clay routines get function:t_abc123
clay routines list | jq -r '.data[0].id' | xargs clay routines get