ToolUseContent class

A request from the assistant to call a tool.

Inheritance
Implemented types
Annotations
  • @Deprecated('Deprecated as of protocol version 2026-07-28 (SEP-2577). ' 'Remains in the specification for at least twelve months.')

Constructors

ToolUseContent({required String id, required String name, required Map<String, Object?> input, Annotations? annotations, MetaObject? $meta})
Creates a ToolUseContent.
ToolUseContent.toMCP(Map<String, Object?> map)
Builds a ToolUseContent from a decoded MCP JSON map.
factory

Properties

$meta MetaObject?
Optional metadata.
getter/setter pairinherited
annotations Annotations?
Optional client annotations.
getter/setter pairinherited
data String
Base64-encoded binary data (used for image / audio content).
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
id String
A unique identifier for this tool use.
getter/setter pair
input Map<String, Object?>
The arguments to pass to the tool, conforming to the tool's input schema.
getter/setter pair
mimeType String
MIME type of data.
getter/setter pairinherited
name String
The name of the tool to call.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type String
The content type discriminator (e.g. "text", "image", "audio").
getter/setter pairinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, Object?>
Converts this ToolUseContent into a JSON-compatible map.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited