Skip to main content
Update an existing routine. At least one update flag is required. Returns the updated routine in the same shape as clay routines get.
clay routines update <routineId> [flags]

Arguments

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

Flags

FlagDescription
--name <name>Set the routine name (max 100 characters).
--description <description>Set the description. Pass an empty string to clear it.
--entity-type <type>Set the MCP entity type. One of contact or company.
--integrations <csv>Replace the full integration set. Comma-separated list of api, mcp, claygent, or the literal none to clear all integrations. An empty string is rejected.

Output

Same shape as clay routines get — the updated routine, including access.integrations.

Errors

CodeExitNotes
validation_error2Missing update flags, invalid entity type, or invalid integration value.
not_found6No routine with that id in this workspace.
auth_forbidden3The API key lacks the cli:all scope (or all).

Examples

clay routines update function:t_abc123 --name "Renamed routine"
clay routines update function:t_abc123 --description "" --entity-type company
clay routines update function:t_abc123 --integrations api,mcp
clay routines update function:t_abc123 --integrations none