Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
53a2bdb
test: Add httpx dependency to mcp tests
alexander-alderman-webb Jul 28, 2026
03b7218
re-run matrix
alexander-alderman-webb Jul 28, 2026
b953f5d
test(fastmcp): Remove assertions on root properties in handler results
alexander-alderman-webb Jul 28, 2026
022356c
.
alexander-alderman-webb Jul 28, 2026
4d643de
.
alexander-alderman-webb Jul 28, 2026
0d5c56b
fix
alexander-alderman-webb Jul 28, 2026
2aaed07
merge master
alexander-alderman-webb Jul 29, 2026
2dd7536
ref(mcp): Remove redundant mcp.tool.result.is_error
alexander-alderman-webb Jul 29, 2026
d81e80c
forgot fastmcp tests
alexander-alderman-webb Jul 29, 2026
94f7c1b
restore toxfiles
alexander-alderman-webb Jul 29, 2026
12ba7a6
restore tox files
alexander-alderman-webb Jul 29, 2026
7d1f6c6
test: Remove manual transactions around MCP spans from the stdio tran…
alexander-alderman-webb Jul 29, 2026
f891c3a
merge
alexander-alderman-webb Jul 29, 2026
5080060
another one
alexander-alderman-webb Jul 29, 2026
b22d9da
Merge branch 'webb/mcp-remove-stdio-transactions' into webb/fastmcp-t…
alexander-alderman-webb Jul 29, 2026
18df577
restore sse test
alexander-alderman-webb Jul 29, 2026
66eac57
Merge branch 'webb/mcp-remove-stdio-transactions' into webb/fastmcp-t…
alexander-alderman-webb Jul 29, 2026
1d8b246
add print to debug ci
alexander-alderman-webb Jul 29, 2026
fdf5788
restore pre-merge state
alexander-alderman-webb Jul 29, 2026
8028564
test(fastmcp): Replace broad try...except with skipif
alexander-alderman-webb Jul 29, 2026
4dafa5f
.
alexander-alderman-webb Jul 29, 2026
b37db34
merge
alexander-alderman-webb Jul 29, 2026
eb76bfa
.
alexander-alderman-webb Jul 29, 2026
a3d4b29
Merge branch 'webb/fastmcp-try-except' into webb/fastmcp-types
alexander-alderman-webb Jul 29, 2026
c60bce2
Merge branch 'webb/fastmcp-types' into webb/remove-mcp-tool-result-is…
alexander-alderman-webb Jul 29, 2026
dcf2d7a
fix boolean logic
alexander-alderman-webb Jul 29, 2026
f520477
use mcp package version
alexander-alderman-webb Jul 29, 2026
e83f15f
Merge branch 'webb/fastmcp-try-except' into webb/fastmcp-types
alexander-alderman-webb Jul 29, 2026
475ffbc
Merge branch 'webb/fastmcp-types' into webb/remove-mcp-tool-result-is…
alexander-alderman-webb Jul 29, 2026
5ce85fb
Merge branch 'master' into webb/remove-mcp-tool-result-is_error
alexander-alderman-webb Jul 29, 2026
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
2 changes: 0 additions & 2 deletions sentry_sdk/integrations/mcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,8 +430,6 @@ async def _tool_handler_wrapper(
result = await result

except Exception as e:
# Set error flag for tools
_set_span_data_attribute(span, SPANDATA.MCP_TOOL_RESULT_IS_ERROR, True)
sentry_sdk.capture_exception(e)
Comment thread
alexander-alderman-webb marked this conversation as resolved.
raise

Expand Down
6 changes: 0 additions & 6 deletions tests/integrations/fastmcp/test_fastmcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,9 +560,6 @@ def failing_tool(value: int) -> int:
error_event = error_events[0]
assert error_event["exception"]["values"][0]["type"] == "ValueError"
assert error_event["exception"]["values"][0]["value"] == "Tool execution failed"

# Verify span is marked with error
assert tool_spans[0]["attributes"][SPANDATA.MCP_TOOL_RESULT_IS_ERROR] is True
else:
events = capture_events()
with start_transaction(name="fastmcp tx"):
Expand Down Expand Up @@ -592,9 +589,6 @@ def failing_tool(value: int) -> int:
assert error_event["exception"]["values"][0]["type"] == "ValueError"
assert error_event["exception"]["values"][0]["value"] == "Tool execution failed"

# Verify span is marked with error
assert tool_spans[0]["data"][SPANDATA.MCP_TOOL_RESULT_IS_ERROR] is True


@pytest.mark.asyncio
@pytest.mark.parametrize("FastMCP", fastmcp_implementations, ids=fastmcp_ids)
Expand Down
7 changes: 0 additions & 7 deletions tests/integrations/mcp/test_mcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,6 @@ def failing_tool(tool_name, arguments):
error_payload["exception"]["values"][0]["value"] == "Tool execution failed"
)

assert span["attributes"][SPANDATA.MCP_TOOL_RESULT_IS_ERROR] is True
assert span["status"] == "error"
else:
events = capture_events()
Expand Down Expand Up @@ -669,8 +668,6 @@ def failing_tool(tool_name, arguments):
assert len(tx["spans"]) == 1
span = tx["spans"][0]

# Error flag should be set for tools
assert span["data"][SPANDATA.MCP_TOOL_RESULT_IS_ERROR] is True
assert span["status"] == "internal_error"
assert span["tags"]["status"] == "internal_error"

Expand Down Expand Up @@ -963,7 +960,6 @@ async def failing_prompt(name, arguments):
assert error_payload["level"] == "error"
assert error_payload["exception"]["values"][0]["type"] == "RuntimeError"
assert span["status"] == "error"
assert SPANDATA.MCP_TOOL_RESULT_IS_ERROR not in span["attributes"]
else:
events = capture_events()
with start_transaction(name="mcp tx"):
Expand Down Expand Up @@ -992,7 +988,6 @@ async def failing_prompt(name, arguments):
span = tx["spans"][0]

assert span["status"] == "internal_error"
assert SPANDATA.MCP_TOOL_RESULT_IS_ERROR not in span["data"]


@pytest.mark.asyncio
Expand Down Expand Up @@ -1250,7 +1245,6 @@ def failing_resource(uri):
assert error_payload["level"] == "error"
assert error_payload["exception"]["values"][0]["type"] == "FileNotFoundError"
assert span["status"] == "error"
assert SPANDATA.MCP_TOOL_RESULT_IS_ERROR not in span["attributes"]
else:
events = capture_events()
with start_transaction(name="mcp tx"):
Expand All @@ -1276,7 +1270,6 @@ def failing_resource(uri):
span = tx["spans"][0]

assert span["status"] == "internal_error"
assert SPANDATA.MCP_TOOL_RESULT_IS_ERROR not in span["data"]


@pytest.mark.asyncio
Expand Down
Loading