notifyTool method
Invokes an MCP tool as a notification through the active session.
Implementation
Future<void> notifyTool(
String name, {
McpJsonMap arguments = const <String, Object?>{},
bool streamable = true,
String? protocolVersion,
Map<String, String> headers = const <String, String>{},
}) {
final toolName = _validatedMcpToolName(name, 'name');
return notification(
'tools/call',
params: <String, Object?>{'name': toolName, 'arguments': arguments},
streamable: streamable,
protocolVersion: protocolVersion,
headers: _headersWithToolParameterHeaders(toolName, arguments, headers),
);
}