Execution

Call a tool

Executes a tool on the server and returns the MCP CallToolResult plus an additive durationMs (wall-clock time of executeTool). Tool-level failures (isError: true in the result) are successful calls — the server answered; only transport/auth errors use the error envelope.

post/projects/{projectId}/servers/{serverId}/tools/call

Path parameters

projectIdstring required

ID of the hosted project that contains the server.

serverIdstring required

ID of the server inside the project.

Request body

toolNamestring required

Tool name, exactly as returned by the tools list.

parametersobject

Tool arguments matching the tool's inputSchema. Defaults to {}.

Response

The MCP CallToolResult plus additive durationMs. Check isError for tool-level failures.

contentobject[] required

Content blocks (text, image, resource, ...).

structuredContentobject

Structured output matching the tool's outputSchema, when declared.

isErrorboolean

true when the tool reported a failure. The HTTP call still succeeds — the server answered.

durationMsinteger

Wall-clock milliseconds spent in executeTool on this request. Additive MCPJam field; not part of the MCP CallToolResult spec. A server that already returns its own top-level durationMs keeps it — MCPJam never overwrites the field — so this value is MCPJam's measurement only when the server did not report one.