McpToolBase class abstract

Base class for tools that simplify implementation

Provides a template method pattern for easier tool creation.

Implemented types
Implementers

Constructors

McpToolBase()

Properties

description String
Tool description for AI agents
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
inputSchema Map<String, dynamic>
Input schema (JSON Schema format)
no setterinherited
metadata Map<String, dynamic>
Get tool metadata as a map (for tool listing)
no setteroverride
name String
Tool name (must be unique across all tools)
no setterinherited
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
override
executeImpl(Map<String, dynamic> params) Future
Implement the actual tool logic
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
validateParams(Map<String, dynamic>? params) String?
Validate parameters before execution

Operators

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