McpTool class abstract
Base interface for all MCP tools
All tools must implement this interface to be registered with an MCP server.
- Implementers
Constructors
- McpTool()
Properties
- description → String
-
Tool description for AI agents
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
inputSchema
→ Map<
String, dynamic> -
Input schema (JSON Schema format)
no setter
-
metadata
→ Map<
String, dynamic> -
Get tool metadata as a map (for tool listing)
no setter
- name → String
-
Tool name (must be unique across all tools)
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
execute(
McpRequest request) → Future< McpResponse> - Execute the tool with given request
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited