Execute Tool
POST/v1/agents/:agent_id/mcp/tools/:tool_name/execute
Execute an MCP tool (for testing purposes).
This endpoint allows testing tool execution before deploying to production. In production, tools are executed automatically by the Voice Agent during calls.
Requires: Active MCP connection (call /mcp/connect first)
Example Request:
{
"arguments": {
"location": "Istanbul",
"units": "metric"
}
}
Example Response (Success):
{
"success": true,
"result": {
"content": [
{
"type": "text",
"text": "Current weather in Istanbul: 15°C, partly cloudy"
}
]
},
"execution_time_ms": 234
}
Example Response (Error):
{
"success": false,
"error": "Tool not found: invalid_tool_name"
}
Request
Responses
- 200
- 422
Successful Response
Validation Error