Tool<Input , Output > class
base
Constructors
Tool ({required String name , required String description , required ToolFn <Input , Output > fn , SchemanticType<Input > ? inputSchema , SchemanticType<Output > ? outputSchema , Map <String , dynamic > ? metadata })
Properties
actionType
→ ActionType
final inherited
description
→ String ?
final inherited
hashCode
→ int
The hash code for this object.
no setter inherited
initSchema
→ SchemanticType<void > ?
final inherited
inputSchema
→ SchemanticType<Input > ?
final inherited
key
→ String ?
The fully-qualified registry key (/$actionType/$name) or, for actions
resolved through a dynamic action provider, the DAP key
(/dynamic-action-provider/<host>:<actionType>/<name>).
no setter inherited
metadata
→ Map <String , dynamic >
final inherited
name
→ String
final inherited
outputSchema
→ SchemanticType<ToolResult <Output > > ?
final inherited
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
streamSchema
→ SchemanticType<void > ?
final inherited
toolOutputSchema
→ SchemanticType<Output > ?
The schema of Output, as passed to the constructor's outputSchema.
It is what the model, the Dev UI and MCP tools/list see as the tool's
output.
final
Methods
call (Input? input , {StreamingCallback <void > ? onChunk , Map <String , dynamic > ? context , Stream <Input > ? inputStream , void init , TraceStartCallback ? onTraceStart , CancellationToken ? cancel })
→ Future <ToolResult <Output > >
inherited
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
run (Input? input , {StreamingCallback <void > ? onChunk , Map <String , dynamic > ? context , Stream <Input > ? inputStream , void init , TraceStartCallback ? onTraceStart , CancellationToken ? cancel })
→ Future <RunResult <ToolResult <Output > > >
inherited
runRaw (dynamic input , {StreamingCallback <void > ? onChunk , Map <String , dynamic > ? context , Stream <Input > ? inputStream , dynamic init , TraceStartCallback ? onTraceStart , CancellationToken ? cancel })
→ Future <RunResult <ToolResult <Output > > >
inherited
stream (Input? input , {Map <String , dynamic > ? context , Stream <Input > ? inputStream , void init , CancellationToken ? cancel })
→ ActionStream <void , ToolResult <Output > >
inherited
streamBidi ({Stream <Input > ? inputStream , StreamingCallback <void > ? onChunk , Map <String , dynamic > ? context , void init , CancellationToken ? cancel })
→ BidiActionStream <void , ToolResult <Output > , Input >
Starts a bidirectional session with this action: send inputs with
BidiActionStream.send while consuming output chunks.
inherited
toJson ()
→ Map <String , dynamic >
inherited
toString ()
→ String
A string representation of this object.
inherited