notifyToolDirect method
Invokes an MCP tool notification through the direct JSON API.
Implementation
Future<void> notifyToolDirect(
String name, {
McpJsonMap arguments = const <String, Object?>{},
String? protocolVersion,
Map<String, String> headers = const <String, String>{},
}) {
final toolName = _validatedMcpToolName(name, 'name');
return notificationDirect(
'tools/call',
params: <String, Object?>{'name': toolName, 'arguments': arguments},
protocolVersion: protocolVersion,
headers: _headersWithToolParameterHeaders(toolName, arguments, headers),
);
}