From 49b8f07e5ddfe0c5408a95ed7e9f52b65828c060 Mon Sep 17 00:00:00 2001 From: Alexander Alderman Webb Date: Tue, 7 Jul 2026 11:34:39 +0200 Subject: [PATCH] fix(mcp): Stop adding the prompt name to arguments --- sentry_sdk/integrations/mcp.py | 1 - tests/integrations/mcp/test_mcp.py | 1 - 2 files changed, 2 deletions(-) diff --git a/sentry_sdk/integrations/mcp.py b/sentry_sdk/integrations/mcp.py index e2b92bd39e..a97a5e9354 100644 --- a/sentry_sdk/integrations/mcp.py +++ b/sentry_sdk/integrations/mcp.py @@ -275,7 +275,6 @@ def _extract_handler_data_from_params( elif handler_type == "prompt": handler_name = getattr(params, "name", "unknown") arguments = getattr(params, "arguments", None) or {} - arguments = {"name": handler_name, **arguments} else: # resource handler_name = str(getattr(params, "uri", "unknown")) arguments = {} diff --git a/tests/integrations/mcp/test_mcp.py b/tests/integrations/mcp/test_mcp.py index 42e85c6343..8fe82ee0be 100644 --- a/tests/integrations/mcp/test_mcp.py +++ b/tests/integrations/mcp/test_mcp.py @@ -777,7 +777,6 @@ async def test_prompt(name, arguments): assert data[SPANDATA.MCP_METHOD_NAME] == "prompts/get" assert data[SPANDATA.MCP_TRANSPORT] == "stdio" assert data[SPANDATA.MCP_REQUEST_ID] == "req-prompt" - assert data["mcp.request.argument.name"] == "code_help" assert data["mcp.request.argument.language"] == "python" # Message count is always captured