CallToolResult
The server's response to a CallToolRequest.
Contains the result of the tool execution, which can be successful or an error.
Important error handling:
Errors that originate from the tool itself SHOULD be reported inside the result object with isError set to true, NOT as an MCP protocol-level error response. This allows the LLM to see that an error occurred and potentially self-correct.
Errors in finding the tool, unsupported operations, or other exceptional conditions SHOULD be reported as MCP protocol-level error responses.
Constructors
Properties
A list of content blocks that represent the unstructured result of the tool call. This is what the LLM will see as the tool's output.
Optional metadata for this response.
An optional JSON object that represents the structured result of the tool call. Provides machine-readable output in addition to the human-readable content.