From 95f4d8a6fe1a9aa4bb4b9d5edc67dfcb263f8786 Mon Sep 17 00:00:00 2001 From: David Cramer Date: Wed, 5 Nov 2025 09:17:35 -0800 Subject: [PATCH 1/2] feat(tools): enhance use_sentry description for better LLM triggering Replace generic use_sentry tool description with a comprehensive, capability-focused version that helps LLMs better understand when to trigger the tool. Key improvements: - Added clear use cases: multi-step operations, exploration, chaining - Listed capabilities organized by skill (inspect, seer, docs, triage, project-management) - Included 3 concrete usage examples - Added explicit hint that "use Sentry" phrases trigger this tool - Provided guidance on parameter passing and trace debugging This addresses issues where LLMs weren't reliably triggering use_sentry when users asked to "use Sentry" for tasks or requested complex operations. Co-Authored-By: Claude Code --- .../src/tools/use-sentry/handler.ts | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/packages/mcp-server/src/tools/use-sentry/handler.ts b/packages/mcp-server/src/tools/use-sentry/handler.ts index fcf2de91e..74c282c29 100644 --- a/packages/mcp-server/src/tools/use-sentry/handler.ts +++ b/packages/mcp-server/src/tools/use-sentry/handler.ts @@ -39,10 +39,33 @@ export default defineTool({ requiredSkills: [], // Only available in agent mode - bypasses authorization requiredScopes: [], // No specific scopes - uses authentication token description: [ - "Use Sentry's MCP Agent to answer questions related to Sentry (sentry.io).", + "Natural language interface to Sentry via an embedded AI agent.", "", - "You should pass the entirety of the user's prompt to the agent. Do not interpret the prompt in any way. Just pass it directly to the agent.", + "Use this tool when you need to:", + "- Perform complex multi-step operations", + "- Explore and analyze Sentry data with natural language", + "- Chain multiple operations automatically", "", + "Capabilities depend on granted skills:", + "• inspect: Search errors/events, analyze traces, explore issues and projects", + "• seer: Get AI-powered debugging insights and root cause analysis", + "• docs: Search and retrieve Sentry documentation", + "• triage: Resolve, assign, comment on, and update issues", + "• project-management: Create/modify teams, projects, and configure DSNs", + "", + "", + "use_sentry(request='find unresolved errors from yesterday')", + "use_sentry(request='analyze the top 3 performance issues')", + "use_sentry(request='create a backend team and assign them to API project')", + "", + "", + "", + "- If user asks to 'use Sentry' for something, they always mean to call this tool", + "- Pass the user's request verbatim - do not interpret or rephrase", + "- The agent can chain multiple tool calls automatically", + "- Use trace=true parameter to see which tools were called", + "- For simple single-tool operations, consider calling tools directly instead", + "", ].join("\n"), inputSchema: { request: z From 3b0932d5e8880e474d7b4c961b4c74b20fe3624a Mon Sep 17 00:00:00 2001 From: David Cramer Date: Wed, 5 Nov 2025 09:18:27 -0800 Subject: [PATCH 2/2] style: use consistent hyphens for lists in use_sentry description MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace unicode bullet points (•) with hyphens (-) in the capabilities list to match the formatting style of other lists in the description. Co-Authored-By: Claude Code --- packages/mcp-server/src/tools/use-sentry/handler.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/mcp-server/src/tools/use-sentry/handler.ts b/packages/mcp-server/src/tools/use-sentry/handler.ts index 74c282c29..d25458ed2 100644 --- a/packages/mcp-server/src/tools/use-sentry/handler.ts +++ b/packages/mcp-server/src/tools/use-sentry/handler.ts @@ -47,11 +47,11 @@ export default defineTool({ "- Chain multiple operations automatically", "", "Capabilities depend on granted skills:", - "• inspect: Search errors/events, analyze traces, explore issues and projects", - "• seer: Get AI-powered debugging insights and root cause analysis", - "• docs: Search and retrieve Sentry documentation", - "• triage: Resolve, assign, comment on, and update issues", - "• project-management: Create/modify teams, projects, and configure DSNs", + "- inspect: Search errors/events, analyze traces, explore issues and projects", + "- seer: Get AI-powered debugging insights and root cause analysis", + "- docs: Search and retrieve Sentry documentation", + "- triage: Resolve, assign, comment on, and update issues", + "- project-management: Create/modify teams, projects, and configure DSNs", "", "", "use_sentry(request='find unresolved errors from yesterday')",