CallToolResult extension type
The server's response to a tool call.
Any errors that originate from the tool SHOULD be reported inside the result
object, with isError
set to true, not as an MCP protocol-level error
response. Otherwise, the LLM would not be able to see that an error occurred
and self-correct.
However, any errors in finding the tool, an error indicating that the server does not support tool calls, or any other exceptional conditions, should be reported as an MCP error response.
Constructors
-
CallToolResult.new({Meta? meta, required List<
Content> content, bool? isError}) -
factory
-
CallToolResult.fromMap(Map<
String, Object?> _value)
Properties
-
content
→ List<
Content> -
The type of content, either TextContent, ImageContent,
or EmbeddedResource,
no setter
- isError → bool?
-
Whether the tool call ended in an error.
no setter
- meta → Meta?
-
no setterinherited