Repository navigation
feat(mcp): Return structured output from search_issues - #2004
Merged
Merged
Conversation
search_issues now declares an outputSchema and returns structuredContent on every success path instead of markdown. Issues are mapped explicitly, using the field names get_issue_details already uses (occurrences, usersImpacted, seerActionability, url), so the passthrough issue schema cannot leak backend fields. The search URL, executed query, sort, period, and project are top-level fields. Query rewrite and empty-result guidance go in notes[]. Suggested actions open the first issue, and the first feedback issue when one is present, with get_sentry_resource. The markdown formatter had no other callers, so results.ts replaces formatters.ts. The shared suggested-action helper is brought over unchanged from the search_errors change so this branch stands alone on main. Co-Authored-By: David Cramer <23610+dcramer@users.noreply.github.com>
…emails Co-Authored-By: David Cramer <23610+dcramer@users.noreply.github.com>
Copy suggested-actions.ts and ai-conversation-actions.ts byte-for-byte from the get_replay_details change, which exports MAX_SUGGESTED_ACTIONS and SuggestedActionValue, so every structured-output branch adds the same bytes and they merge cleanly in any order. 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
|
…ssues Map the assignee email and the feedback reporter's name and contact email as explicit fields. Keep the issue metadata schema from stripping the reporter fields during parsing. Co-Authored-By: David Cramer <23610+dcramer@users.noreply.github.com>
Co-Authored-By: David Cramer <23610+dcramer@users.noreply.github.com>
Co-Authored-By: David Cramer <23610+dcramer@users.noreply.github.com>
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.
search_issuesnow declares anoutputSchemaand returnsstructuredContenton every success path, following the Structured Content policy indocs/contributing/tool-responses.md. The model now sees pretty JSON instead of markdown.Payload
shortId,title,url,status,substatus,issueCategory,occurrences,usersImpacted,assignedTo,assigneeEmail,reporter,firstSeen,lastSeen,culprit,seerActionability,projectSlug.notes[].suggestedActionsopen the first issue withget_sentry_resource, plus the first feedback issue when there is one.assigneeEmailcomes from a user assignee.reporteris{name, email}from a feedback issue'smetadata.nameandmetadata.contact_email, and null for other issues. The issuemetadataschema now keeps those two keys so parsing doesn't strip them.permalinkstay out.Code
results.tsreplacesformatters.ts, which had no other callers. Its tests moved toresults.test.ts, andsearch-issues.test.tsnow asserts onstructuredContent.internal/tool-helpers/suggested-actions.tsandai-conversation-actions.tsare byte-identical to the canonical copies from the get_replay_details change (blobsee84917/63ff7bd), so this branch stands alone on main. Whichever of feat(mcp): Return structured output from search_errors #1987 and this PR merges second touches the same files; the identical add/add should merge cleanly.Tokens
measure-tokenstotal is 47,553 with a delta of 0, because the description and input schema are unchanged. The script doesn't countoutputSchema.outputSchemaadds about 423 tokens totools/list.Checks (run with
SENTRY_AUTH_TOKENunset, package-scoped only)pnpm run --filter @sentry/mcp-core generate-definitionspnpm --filter @sentry/mcp-core run tscpnpm run lintRoot
pnpm run tscwas not run because its cloudflare build uploads source maps. Evals were skipped because they need API keys.Merge note:
toolDefinitions.jsonwill conflict with the sibling structured-output PRs. On rebase, regenerate it withpnpm run --filter @sentry/mcp-core generate-definitions.via @dcramer.
--
View Session [Sentry]