BaseTool class abstract
Base class for all MCP tools.
Constructors
- BaseTool()
Properties
- annotations → ToolAnnotations?
-
Optional tool annotations with hints about tool behavior.
Includes readOnlyHint, destructiveHint, idempotentHint, etc.
no setter
- description → String
-
Human-readable description of what this tool does.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- inputSchema → ToolInputSchema
-
JSON schema defining the input arguments.
Use
JsonSchema.object()to create an object schema.no setter -
meta
→ Map<
String, dynamic> ? -
Optional metadata for the tool.
no setter
- name → String
-
Unique name for this tool.
no setter
- outputSchema → ToolOutputSchema?
-
Optional JSON schema defining the output format.
Use
JsonSchema.object()to create an object schema.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
execute(
Map< String, dynamic> args) → Future<CallToolResult> - Execute the tool with the given arguments.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited