callTool method
Call a tool with the given arguments
Implementation
Future<CallToolResult> callTool(String name, Map<String, dynamic> arguments) async {
final tool = _tools[name];
if (tool == null) {
throw McpError('Tool not found: $name');
}
// Execute the tool handler
final handler = _toolHandlers[name];
if (handler == null) {
throw McpError('No handler registered for tool: $name');
}
return await handler(arguments);
}