Create a tool
Create a tool. Two payload shapes exist:
function_type: external:apicreates an API tool from aurland an OpenAI-stylefunction_definition.- Any other
function_typewithcreatable_via_api: trueinGET /api/v2/tools/typescreates a built-in or provider-backed tool from its template; pass type-specific settings inparams.
Behaviours that belong to the agent itself (system:end_call, system:transfer_call,
system:check_forward_availability, system:check_warm_transfer_availability,
system:get_caller_info, system:extract_intent, system:chat_handover) are not creatable and
are rejected with mf-core:tool-invalid-function-type. Call forwarding (system:forward_call),
warm transfer (system:warm_transfer) and DTMF input (system:dtmf_input) are configurable and
stay creatable.
Cal.com tools (cal:get_availability, cal:book_appointment) require params.eventTypeId and
params.timezone; a missing or invalid value is rejected with mf-core:tool-validation-failed
and details.missing_param names the key.
Call-forwarding and warm-transfer types create two tools (a check and an execute tool) and return
both in tools.
Autorisierungen
Scoped API token. Required scopes are listed on each operation in x-required-scopes.
Body
- API tool
- Built-in or provider tool
Create an API tool. integration_id is ignored; the backing integration is created automatically.
Must be external:api.
"external:api"URL to call. {{param}} placeholders are filled from the call arguments.
^https?://OpenAI-style function schema. Its name becomes the tool name.
HTTP method, for example GET or POST.
Request headers. {{param}} placeholders are filled from the call arguments; {{api_key}} resolves to the access token or OAuth token.
Values always sent with the request, not chosen by the agent.
Optional. Must equal function_definition.name.
Mutually exclusive with oauth_provider_id.
ID of an OAuth connection in your account. Mutually exclusive with access_token.
Phrase the agent says before calling the API.
When the agent should use this tool.
Condition override for one agent. Only applied when agent_id is given.
Fields of the API response the agent may use.
Values extracted from the response and stored as variables for later steps.
25Deprecated alias of agent_id (the agent's prompt id).
Enable the tool for this voice agent right away.
Antwort
The created tool, or tool pair.
- API tool
- Built-in or provider tool
- Tool pair
Returned by create and update. Call-forwarding and warm-transfer types return the pair.
ID of the tool.
Tool name as the agent's model sees it. Equals function_definition.name.
What the tool does. Empty for API tools; the model reads function_definition.description.
Always external:api.
"external:api"ID of the integration created for this tool.
ID of the action record backing this tool.
How the API is called.
OpenAI-style function schema the agent's model uses to decide when and how to call the tool.
Only returned by create. True when agent_id was supplied and the tool was enabled for that agent.