Skip to content

feat(catalog): add get_issue_user_reports tool#1141

Merged
dcramer merged 2 commits into
getsentry:mainfrom
Pragyan14:feature/issue-1111-user-reports
Jul 2, 2026
Merged

feat(catalog): add get_issue_user_reports tool#1141
dcramer merged 2 commits into
getsentry:mainfrom
Pragyan14:feature/issue-1111-user-reports

Conversation

@Pragyan14

Copy link
Copy Markdown
Contributor

What

Exposes GET /api/0/issues/{issue_id}/user-reports/ through the MCP catalog as a new get_issue_user_reports tool.

Changes

  • schema.ts — adds UserReportSchema and UserReportListSchema matching the real API response shape
  • client.ts — adds getIssueUserReports() method using the org-scoped endpoint /organizations/{org}/issues/{id}/user-reports/
  • types.ts — adds UserReportList type inferred from the list schema
  • tools/catalog/get-issue-user-reports.ts — new catalog tool following existing patterns (get-issue-activity, get-issue-tag-values)
  • tools/catalog/index.ts — registers the new tool
  • mcp-server-mocks — adds mock handler + issue-user-reports.json fixture based on real API response

Testing

  • Reproduced the gap against a real sentry.io project: confirmed GET /issues/{id}/user-reports/ returns feedback data that was completely invisible to agents before this change
  • Confirmed org-scoped URL (/organizations/{org}/issues/{id}/user-reports/) returns identical data
  • Unit test passes with snapshot matching real formatted output
  • tsc and lint pass clean on @sentry/mcp-core
  • Tool shows as accessible in catalog summary (43 tools, 0 orphaned)

Notes

  • Tool is exposed via catalog only (behind search_sentry_tools / execute_sentry_tool), per maintainer guidance
  • One pre-existing test failure in @sentry/mcp-agent-cli-test (setup.test.ts) is a Windows path normalization bug unrelated to this change — confirmed by reproducing with a clean stash

@dcramer

dcramer commented Jul 2, 2026

Copy link
Copy Markdown
Member

cleaning up a couploe things. one thing i generally do is point the agent at current sentry to make sure theres no gaps in schemas, but broadly speaking patch is good and we'll get it landed today, ty!

Match the upstream user report response shape, add pagination handling, and clarify the tool description so agents do not confuse issue user reports with standalone feedback issues.

Add MSW-backed handler and catalog dispatch coverage, and regenerate tool and skill definitions.

Refs getsentryGH-1111
Co-Authored-By: GPT-5 Codex <noreply@openai.com>
@dcramer
dcramer force-pushed the feature/issue-1111-user-reports branch from 851eb13 to a8ed262 Compare July 2, 2026 17:19
@dcramer
dcramer merged commit e0071ff into getsentry:main Jul 2, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants