Skip to content
Merged
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: 2 additions & 2 deletions sentry_sdk/integrations/mcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@
handler_name = original_kwargs["name"]

arguments = {}
if len(original_args) > 1:
if len(original_args) > 1 and original_args[1] is not None:
arguments = original_args[1]
elif original_kwargs.get("arguments"):
arguments = original_kwargs["arguments"]
Expand Down Expand Up @@ -514,10 +514,10 @@
handler_name = original_kwargs["name"]

arguments = {}
if len(original_args) > 1:
if len(original_args) > 1 and original_args[1] is not None:
arguments = original_args[1]
elif original_kwargs.get("arguments"):
arguments = original_kwargs["arguments"]

Check warning on line 520 in sentry_sdk/integrations/mcp.py

View check run for this annotation

@sentry/warden / warden: code-review

No test covers None prompt arguments path

Add a regression test that invokes the prompt handler with `arguments=None` (positional and/or omitted) so this null-guard cannot regress.
Comment thread
alexander-alderman-webb marked this conversation as resolved.

if has_data_collection_enabled(client.options):
if not client.options["data_collection"]["gen_ai"]["inputs"]:
Expand Down
Loading