Repository navigation
feat(mcp-core): Add get_profile_details tool and fix profile schemas - #870
Merged
dcramer merged 5 commits intoMar 27, 2026
Merged
Conversation
…y_resource Expand ProfileFrameSchema, ProfileChunkSchema, and ProfileSampleSchema with fields that Sentry's profiling API actually returns (class_name, instruction_addr, raw_function, symbol, lang, colno, queue_address, event_id, thread priority). Add profile as a supported resourceType in get_sentry_resource so LLMs can discover and query profiling data directly, not just via URL auto-detection. Adds projectSlug and transactionName params to support this. Update formatProfileChunkAnalysis to show class_name.function for Java/Android frames and fall back to module when filename is absent. Add profile-chunk.json mock fixture and MSW handler. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
dcramer
marked this pull request as ready for review
March 26, 2026 22:49
… get_sentry_resource changes Instead of adding profile as a resourceType in get_sentry_resource, create get_profile_details as its own standalone tool. This gives it proper discoverability without overloading get_sentry_resource. The tool fetches raw profile chunk data for a specific profiler session, formats thread activity, top frames by occurrence, and user/library code breakdown via formatProfileChunkAnalysis. Reverts the get_sentry_resource changes from the previous commit (projectSlug, transactionName params, profile resourceType). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add hideInExperimentalMode flag so the tool is only visible in non-experimental mode, matching the pattern used by get_profile. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
The Sentry profiling API's project query parameter only accepts numeric IDs. Add slug-to-ID resolution using apiService.getProject(), matching the pattern in get_profile. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…e_details Zod schema already enforces profilerId as a required trimmed string, making the runtime check dead code. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
dcramer
deleted the
dcramer/feat/profile-resource-schemas-discoverability
branch
March 27, 2026 02:51
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Add
get_profile_detailsas a standalone tool for fetching raw profile chunk data. This gives profiling proper discoverability — LLMs can now find and use it directly without needing a URL.New tool:
get_profile_details— fetches raw profile chunk data for a specific profiler session. Returns thread activity, top frames by occurrence, and user/library code breakdown. RequiresprofilerId,projectSlugOrId,start, andend.Schema fixes —
ProfileFrameSchema,ProfileChunkSchema, andProfileSampleSchemawere missing fields that Sentry's profiling API actually returns:class_name,instruction_addr,raw_function,symbol,lang,colno,queue_address,event_id, and threadpriority.Formatter improvements —
formatProfileChunkAnalysisnow showsClassName.function()for Java/Android frames and falls back tomodulewhenfilenameis absent.Mock fixture — Added
profile-chunk.jsonfixture and MSW handler for/profiling/chunks/endpoint.Refs #867