Agent Tools

Create agent custom tool

Create a new user-defined agent tool. Pass draft=true to generate a tool definition from a natural-language description without persisting it.

post/api/v0/agent/tools

Query parameters

draftboolean

When true, generate a tool definition without saving.

When true, generate a tool definition without saving.

Request body

tool_type'python' | 'prompt' | 'api'

Tool type: python, prompt, api.

namestring nullable

The tool name (snake_case). Required when draft=false.

descriptionstring

The tool description.

parametersobject[] nullable

Parameter definitions [{name, type, description, required}].

codestring

Code/prompt/config body.

Response

Successful Response

OR

Changes