Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/claude_agent_sdk/_internal/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,9 @@ async def _handle_sdk_mcp_request(
call_request = CallToolRequest(
method=method,
params=CallToolRequestParams(
name=params.get("name"), arguments=params.get("arguments", {})
name=params.get("name"),
arguments=params.get("arguments", {}),
_meta=params.get("_meta"),
Copy link

Copilot AI Dec 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The _meta field forwarding is not covered by tests. Consider adding a test case to verify that the _meta field is correctly passed through from the incoming JSONRPC message to the CallToolRequestParams. This would help ensure that metadata like claudecode/toolUseId is properly preserved when using SDK transport.

Copilot uses AI. Check for mistakes.
),
)
handler = server.request_handlers.get(CallToolRequest)
Expand Down