Skip to main content
POST
Create Agent Tool

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

agent_id
string<uuid>
required

Body

application/json

Schema for creating a new agent_tool instance.

The user is configuring a specific instance — a tool type (tool_key) plus a meaningful instance_name plus per-instance config. A tool cannot be added "raw" (just a type with no instance_name and no config) — the controller enforces this:

  • tool_key MUST exist in the registry (tool_registry table)
  • instance_name is REQUIRED (no silent default to tool_key)
  • per-type required CFG fields are validated (e.g. http_webhook needs url_allowlist; send_text_tool needs provider+from_e164+secret refs)
tool_key
string
required

Tool type identifier from the registry. Must match an entry from GET /agents/{agent_id}/tools/registry/available.

instance_name
string
required

Stable identifier the LLM will use to call this tool. Must be meaningful (e.g. 'transfer_to_billing', 'end_call_polite'); the same tool_key can be instanced multiple times with different configs. Must be unique per agent. Pattern: ^[A-Za-z][A-Za-z0-9_-]{0,118}[A-Za-z0-9]?$

Required string length: 1 - 120
display_name
string | null

Human-friendly UI label.

enabled
boolean
default:true
config
ToolConfig · object | null

Aggregate config for a tool instance — full v2 Field Reference superset.

Frontend may submit any subset of these fields. Whatever is non-None is persisted into the agent_tool.config JSON blob. The runtime reads only the fields relevant to the resolved tool_type.

Section numbers below cite mr-assistant-tools-field-reference v2.

tool_type
string | null
default:function
description
string | null

Response

Successful Response

Schema for tool response.

id
string
required
agent_id
string
required
tool_key
string
required
instance_name
string
required
display_name
string | null
required
tool_type
string
required
enabled
boolean
required
is_active
boolean
required
version
integer
required
config
Config · object
required
description
string | null
required
created_at
string<date-time>
required
raw_schema
Raw Schema · object | null
rpc_method
string | null
parameters_schema
Parameters Schema · object | null
registry_info
Registry Info · object | null