Skip to content

Tools API

The Tools API lets you call any MCP tool directly, bypassing the agent loop. This is the same mechanism the MCP App Bridge uses to proxy tool calls from app iframes.

Invoke a tool on a specific MCP server. The tool executes immediately and returns the result.

Request body:

FieldTypeRequiredDescription
serverstringYesMCP server name (e.g., weather)
toolstringYesTool name on that server (e.g., get_forecast)
argumentsobjectNoInput arguments for the tool. Defaults to {}.

Response:

{
"result": {
"temp": 62,
"condition": "partly cloudy",
"humidity": 78
},
"isError": false
}
FieldTypeDescription
resultunknownTool output. Parsed as JSON if the output is valid JSON, otherwise returned as a string.
isErrorbooleantrue if the tool reported an error

Error responses:

StatuserrorCondition
400bad_requestMissing server or tool field
404tool_not_foundServer does not exist, or tool not found on the server

Examples:

Terminal window
curl -X POST http://localhost:3000/v1/tools/call \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-secret-key" \
-d '{
"server": "weather",
"tool": "get_forecast",
"arguments": { "city": "San Francisco" }
}'

The API constructs the fully qualified tool name by joining the server and tool with a double underscore: {server}__{tool}. For example, server weather and tool get_forecast resolves to weather__get_forecast internally.

The web client uses this endpoint as the backend for the MCP App Bridge. When an app iframe calls a tool via postMessage, the bridge proxies the request to POST /v1/tools/call.

The audit log records every tool call made through this endpoint:

[api] tools/call server=weather tool=get_forecast