Repository navigation
feat(mcp): Return setup knowledge from create_project - #2358
Conversation
create_project now returns `setup` for the new project's platform: its setup guide on docs.sentry.io and the core signals the platform supports (errors, traces, logs, metrics, session replay), each with a one-line `usefulFor` and a docs link. Errors and traces are marked recommended, matching the SDK's default init. Signals the organization has not enabled are left out, using the same organization features Sentry's onboarding checks. That lookup is best effort. The `guidance` string is removed, since it told the agent what to do instead of reporting facts. A failed DSN setup now returns a `create_dsn` suggested action instead. Platform data is generated into platforms.json by `pnpm run generate-platform-setup` from Sentry's platform list and the published docs tree. Co-Authored-By: David Cramer <23610+dcramer@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Co-Authored-By: David Cramer <23610+dcramer@users.noreply.github.com>
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.
Reviewed by Cursor Bugbot for commit 6939abb. Configure here.
|
remove the doc spec change from this PR because we're going to remove the specs in a different PR. |
The specs are being removed in a separate PR.
|
we're likely going to need an automation setup that will handle our scheduled regenerations, but it likely should start with a github workflow, and that workflows should open a pr if no other pr exists (or update the existing pr), and do nothing if theres no updates that are needed. it could run daily f/u in a new thread |
|
Expand Session Replay here because it's not just about seeing; it's about understanding user behavior, particularly within a web UI or mobile UI. In general, the "useful for" should be pretty thoughtful but kept concise here. It shouldn't just be generic statements because agents need to understand if this will be helpful within the context of the application. Additionally, make sure the docs URLs are just full URLs instead of this relative path thing. It's too complicated for an agent. |
Rewrite each signal's usefulFor so an agent can judge whether it fits the app, and expand Session Replay to cover understanding user behavior in web and mobile UIs. The generator now writes absolute docs.sentry.io URLs, so platforms.json and the runtime no longer join relative paths.
) `create_project`'s platform setup data (`platforms.json`), added in #2358, is regenerated by hand today. This adds `regenerate-platform-setup.yml`, which runs daily and on manual dispatch from `main`. It runs `pnpm --filter @sentry/mcp-core run generate-platform-setup` and keeps one PR with any changes on the fixed `bot/regenerate-platform-setup` branch. `scripts/platform-setup-pr.mjs` decides what to do: - The generated data matches `main`, or matches the open PR: nothing. No commit, no push, no PR. - The data changed and no PR is open: commit it on a branch from `main`, force-push the bot branch (this overwrites a leftover branch from a closed PR), and open the PR. - The data changed and the open PR has older data: rebuild the branch from `main` and force-push it with a lease. The existing PR picks it up, and no second PR is opened. The PR is never merged automatically. It follows the `bump-sentry-api.yml` rolling-PR pattern: the release bot (`SENTRY_RELEASE_BOT_CLIENT_ID` / `SENTRY_RELEASE_BOT_PRIVATE_KEY`, already used by `release.yml` and `bump-sentry-api.yml`) pushes and opens the PR so `test.yml` runs on it. Commits use the `github-actions[bot]` identity, like that bump. This assumes the release bot can push branches and open PRs in this repo, which `bump-sentry-api.yml` already relies on. Running the generator locally against current sources left `platforms.json` unchanged. <!-- junior-request-attribution:start --> via @dcramer. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3A892bc9b6695b269a47717d532623c628 --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3A892bc9b6695b269a47717d532623c628) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A892bc9b6695b269a47717d532623c628/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: David Cramer <23610+dcramer@users.noreply.github.com>

create_projectnow tells the calling agent which Sentry signals the new project can collect and where each one is documented. Before, it returned only a DSN and an instruction string.Behavior
recommended, because the SDK's defaultinitturns them on.getDisabledProducts:ourlogs-enabled,tracemetrics-enabled, andsession-replay. The lookup runs in parallel with the DSN lookup and is best effort: if it fails, every supported signal is listed.setupisnullwhen the project has no platform, and in that case the organization isn't fetched.guidancestring is removed. It told the agent what to do, which the tool-response design rules forbid. A failed DSN setup now returns acreate_dsnsuggested action. OtherwisesuggestedActionsis empty.Platform data
platforms.jsonis generated and committed. Runningpnpm --filter @sentry/mcp-core run generate-platform-setupreads:static/app/data/platforms.tsx: platform IDs, names, and docs links. It skips deprecated platforms and follows docs redirects.docs.sentry.io/doctree.json: a platform supports a signal when its docs page has atracing,logs,metrics, orsession-replaychild page. Guides with no signal pages of their own fall back to their docsfallbackGuide(Express → Node.js), or to the nearest parent page (Django → Python).All 110 non-deprecated Sentry platforms resolve to a setup page. Every docs link is stored as a full
https://docs.sentry.io/...URL, so agents never join paths.Open questions
platforms.jsonis regenerated by hand, like the OTel namespace data. Should a scheduled job refresh it?sentry-instrumentskill (skills.sentry.dev) currently reads only the DSN from this result. It can start usingsetuponce this ships, but that change belongs in the skills repo.via @dcramer.
--
View Session [Sentry]