You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
get_issue_details returns stack frames with file, line, function, and source code, but not local variable values — even when Sentry has captured them. Without variable context, the assistant can't actually diagnose the issue — it has to punt back to the human to check the UI. That defeats the purpose of the MCP integration.
I ran into this today. We had an EncodeError: Object of type str is not JSON serializable in a Celery/Kombu stack. In the Sentry web UI, I can see the value of o at the crash site (json/encoder.py:180) — it was a SimpleLazyObject. That's the whole answer to "what was being encoded?" But the MCP tool only gave me frame metadata, so I had to leave the AI workflow and go look at the UI myself.
Proposed solution:
Rather than bloating every get_issue_details response with variables from every frame, add a separate tool like get_frame_variables(issue_id, event_id, frame_index) that returns the local variables for a specific stack frame. This keeps the common case token-efficient while still letting the assistant drill into the frame that matters.
Another option to save on # of requests might be to include variable data only for the top/bottom frame of each exception by default, since that's where the most useful context usually lives.
Another report of this, now that variables are shown but cut short (MCP feedback MCP-SERVER-GN2, hosted server 0.42.0, Claude).
The agent needed one nested local (response_json, an API error body like {"errors":[{"carrier_code":…,"carrier_id":…,"error_code":…,"message":…}],"request_id":…}) from the top in-app frame of each event, to classify causes. get_sentry_resource / get_issue_details rendered it as:
so error_code and message never appear, and no tool returns a single frame's variables or the raw event.
Cause: formatVariableValue(value, maxLength = 80) stringifies objects and cuts at 80 chars (packages/mcp-core/src/internal/formatting.ts:853-883), used by renderVariablesTable (:907-922).
Activity
sentry-junior commentedon Nov 10, 2026
Another report of this, now that variables are shown but cut short (MCP feedback MCP-SERVER-GN2, hosted server 0.42.0, Claude).
The agent needed one nested local (
response_json, an API error body like{"errors":[{"carrier_code":…,"carrier_id":…,"error_code":…,"message":…}],"request_id":…}) from the top in-app frame of each event, to classify causes.get_sentry_resource/get_issue_detailsrendered it as:so
error_codeandmessagenever appear, and no tool returns a single frame's variables or the raw event.formatVariableValue(value, maxLength = 80)stringifies objects and cuts at 80 chars (packages/mcp-core/src/internal/formatting.ts:853-883), used byrenderVariablesTable(:907-922).varsinto structured output with a 200-char cut. That helps, but a nested error body like this one can still be cut, so it doesn't fully cover the per-frame drill-down asked for here.