feat: add tool_arguments to instrumentation data

Include the tool arguments in instrumentation callback data when
tools/call is invoked. This allows consumers to track which arguments
were passed to each tool call for analytics and debugging purposes.
This commit is contained in:
Mikhail Dubov 2026-01-21 17:18:28 +00:00
commit 7412197e52

View file

@ -322,7 +322,7 @@ module MCP
end
arguments = request[:arguments] || {}
add_instrumentation_data(tool_name: tool_name)
add_instrumentation_data(tool_name: tool_name, tool_arguments: arguments)
if tool.input_schema&.missing_required_arguments?(arguments)
add_instrumentation_data(error: :missing_required_arguments)