CallToolResult class
The result a ToolHandler returns. Mirrors MCP CallToolResult.
Constructors
-
CallToolResult({required List<
Map< content, bool? isError})String, dynamic> > -
CallToolResult.fromJson(Map<
String, dynamic> json) -
Parses a CallToolResult from wire JSON.
factory
- CallToolResult.text(String text, {bool? isError})
-
Convenience for a single text result.
factory
Properties
-
content
→ List<
Map< String, dynamic> > -
Content items (each an MCP content payload, e.g.
{type:'text', text}).final - hashCode → int
-
The hash code for this object.
no setterinherited
- isError → bool?
-
Whether the tool call failed.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Serializes to wire JSON.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited