Skip to content

Commit 0095dde

Browse files
DominikB2014claude
andcommitted
Merge origin/main into seer-search-agent-nlq
Resolve conflicts from the searchable tool catalog refactor (#1041): - Port the Seer translation branch from search-events/handler.ts into tools/catalog/search-events.ts and skip it on the no-agent fast path - Move seer.ts to tools/support/search-events/ - Move the Seer tests into tools/catalog/search-events.test.ts and expect unrewritten aggregate sorts, matching main - Use apiPath for getOrganization and the search-agent endpoints - Regenerate toolDefinitions.json Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2 parents 6905405 + 7486ab1 commit 0095dde

571 files changed

Lines changed: 79397 additions & 20248 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.agents/skills/issue-triage/SKILL.md‎

Lines changed: 0 additions & 193 deletions
This file was deleted.

‎.agents/skills/issue-triage/SOURCES.md‎

Lines changed: 0 additions & 28 deletions
This file was deleted.

‎.agents/skills/mcp-qa/SKILL.md‎

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
---
2+
name: mcp-qa
3+
description: QA MCP tool changes with local CLI and real agent clients. Use when explicitly invoked via /mcp-qa or when asked to QA MCP tool changes end-to-end.
4+
---
5+
6+
Verify MCP tool behavior end-to-end before committing or creating a PR. Prefer
7+
agent-callable paths over browser or inspector workflows.
8+
9+
## 1. Quality Gate
10+
11+
```bash
12+
pnpm run tsc && pnpm run lint && pnpm run test
13+
```
14+
15+
Fix any failures before proceeding.
16+
17+
## 2. Stdio CLI
18+
19+
This is the primary QA path for tool behavior. Stdio runs the local MCP server
20+
against prod Sentry without depending on the Cloudflare worker, local `/mcp`
21+
route, or Cloudflare OAuth configuration.
22+
When validating code or tool changes, build first because the test client
23+
launches `packages/mcp-server/dist/index.js`:
24+
25+
```bash
26+
pnpm -w run build
27+
```
28+
29+
Check auth first:
30+
31+
```bash
32+
pnpm --filter @sentry/mcp-server start auth status
33+
```
34+
35+
If no cache exists, warm the device-code cache:
36+
37+
```bash
38+
pnpm --filter @sentry/mcp-server start auth login
39+
```
40+
41+
Device-code auth uses the bundled stdio public client ID, requires no client
42+
secret, is separate from the Cloudflare OAuth app, and caches the token in
43+
`~/.sentry/mcp.json`.
44+
45+
First prove startup and auth:
46+
47+
```bash
48+
pnpm -w run cli --transport stdio --list-tools
49+
pnpm -w run cli --transport stdio "who am I?"
50+
```
51+
52+
Then prove the changed behavior with a realistic prod prompt. Choose a prompt
53+
that requires the new or modified tool path, uses real org/project/resource
54+
inputs, and asks for enough detail to prove the endpoint response is usable.
55+
56+
```bash
57+
pnpm -w run cli --transport stdio \
58+
"<prompt that exercises the changed MCP behavior against prod data>"
59+
```
60+
61+
Passing QA means the local CLI prints `Connected to MCP server (stdio)`, uses
62+
the expected MCP tool path, and returns real prod data that demonstrates the
63+
behavior. For catalog tools, expect `search_sentry_tools` followed by
64+
`execute_sentry_tool(name: <changed_tool>)`. For direct tools, expect the tool name in
65+
the transcript. `--list-tools` alone is not QA.
66+
67+
For mutating catalog-only tools, avoid live prod changes unless there is a
68+
disposable resource prepared for the test. Add or run a server-level
69+
`execute_sentry_tool` dispatch test with MSW coverage to prove catalog
70+
discovery, generated schema exposure, constraint injection, and tool dispatch
71+
without changing real Sentry data.
72+
73+
For output-format changes, also inspect the raw MCP tool result when possible,
74+
not only the LLM's final answer. The final answer can add model-specific text
75+
that is not part of the tool response. Review raw tool output against
76+
`docs/contributing/tool-responses.md`: it should be user-facing, structured,
77+
and free of raw API JSON, internal implementation IDs, empty placeholders, and
78+
unrelated instructions.
79+
80+
81+
## 3. Real Agent Clients
82+
83+
Use these when validating Claude Code, Codex, or behavior that only reproduces
84+
in a real agent client:
85+
86+
```bash
87+
pnpm -w run build
88+
```
89+
90+
What this verifies:
91+
- The CLI is installed and can see the named MCP server
92+
- The provider can run a connectivity prompt against Sentry MCP
93+
- The final answer includes the authenticated email from `whoami`
94+
95+
For agent-client-specific behavior, replace the default harness prompt with the
96+
same realistic prod prompt used for stdio QA. Passing QA requires the same
97+
changed-tool transcript evidence, not only `whoami`.
98+
99+
as an isolated auth cache. Real clients do not give stdio subprocesses a TTY,
100+
so warm the cache before running the harness. It also runs the built
101+
`packages/mcp-server/dist/index.js`, so build first to avoid stale code.
102+
103+
## 4. Cloudflare HTTP Only When Relevant
104+
105+
Run this only when changes touch Cloudflare, HTTP transport, `/mcp`
106+
routing, OAuth, web UI, or hosted-server compatibility. It is not required for
107+
ordinary tool handler changes.
108+
109+
Start the dev server in a separate terminal or background process:
110+
111+
```bash
112+
pnpm dev
113+
```
114+
115+
Then verify it is reachable:
116+
117+
```bash
118+
curl -s -o /dev/null -w "%{http_code}" http://localhost:5173/
119+
```
120+
121+
If `pnpm dev` fails because local Cloudflare/Wrangler is not configured, note
122+
the failure and continue with stdio QA for tool behavior.
123+
124+
```bash
125+
pnpm -w run cli "who am I?"
126+
pnpm -w run cli "list all available tools"
127+
pnpm -w run cli "<same realistic prod prompt used for stdio QA>"
128+
pnpm -w run cli --mcp-host=http://localhost:5173/mcp/<org> \
129+
"<same realistic prod prompt used for stdio QA>"
130+
pnpm -w run cli --mcp-host=http://localhost:5173/mcp/<org>/<project> \
131+
"<same realistic prod prompt used for stdio QA>"
132+
```
133+
134+
Look for `Connected to MCP server (<resolved MCP URL>)` to confirm HTTP
135+
transport, plus the same changed-tool transcript evidence required for stdio
136+
QA. Use scoped `/mcp/<org>` or `/mcp/<org>/<project>` URLs when validating
137+
routing, OAuth, or resource-scope behavior. Use `--setup repo --server sentry`
138+
to test the hosted server instead.
139+
140+
## 5. Source Build Stdio Only When Relevant
141+
142+
Use this when specifically checking the built local stdio server rather than
143+
dev-time source execution:
144+
145+
```bash
146+
pnpm -w run build
147+
pnpm --filter @sentry/mcp-server start auth status
148+
pnpm -w run cli --transport stdio "who am I?"
149+
```
150+
151+
Look for `Connected to MCP server (stdio)` to confirm stdio transport.

0 commit comments

Comments
 (0)