Skip to content

Commit dc0b067

Browse files
dcramerclaude
andauthored
feat(tools): enhance use_sentry description for better LLM triggering (#626)
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 <noreply@anthropic.com> --------- Co-authored-by: Claude Code <noreply@anthropic.com>
1 parent 4af98e7 commit dc0b067

1 file changed

Lines changed: 25 additions & 2 deletions

File tree

  • packages/mcp-server/src/tools/use-sentry

‎packages/mcp-server/src/tools/use-sentry/handler.ts‎

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,33 @@ export default defineTool({
3939
requiredSkills: [], // Only available in agent mode - bypasses authorization
4040
requiredScopes: [], // No specific scopes - uses authentication token
4141
description: [
42-
"Use Sentry's MCP Agent to answer questions related to Sentry (sentry.io).",
42+
"Natural language interface to Sentry via an embedded AI agent.",
4343
"",
44-
"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.",
44+
"Use this tool when you need to:",
45+
"- Perform complex multi-step operations",
46+
"- Explore and analyze Sentry data with natural language",
47+
"- Chain multiple operations automatically",
4548
"",
49+
"Capabilities depend on granted skills:",
50+
"- inspect: Search errors/events, analyze traces, explore issues and projects",
51+
"- seer: Get AI-powered debugging insights and root cause analysis",
52+
"- docs: Search and retrieve Sentry documentation",
53+
"- triage: Resolve, assign, comment on, and update issues",
54+
"- project-management: Create/modify teams, projects, and configure DSNs",
55+
"",
56+
"<examples>",
57+
"use_sentry(request='find unresolved errors from yesterday')",
58+
"use_sentry(request='analyze the top 3 performance issues')",
59+
"use_sentry(request='create a backend team and assign them to API project')",
60+
"</examples>",
61+
"",
62+
"<hints>",
63+
"- If user asks to 'use Sentry' for something, they always mean to call this tool",
64+
"- Pass the user's request verbatim - do not interpret or rephrase",
65+
"- The agent can chain multiple tool calls automatically",
66+
"- Use trace=true parameter to see which tools were called",
67+
"- For simple single-tool operations, consider calling tools directly instead",
68+
"</hints>",
4669
].join("\n"),
4770
inputSchema: {
4871
request: z

0 commit comments

Comments
 (0)