Skip to content

feat(mcp): Add a display title to every tool - #1991

Merged
dcramer merged 1 commit into
mainfrom
feat/mcp-tool-titles
Nov 5, 2026
Merged

dcramer merged 1 commit into
mainfrom
feat/mcp-tool-titles

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Summary

None of our tools sent the MCP title field, so clients that show a display name (Claude Desktop, VS Code, ChatGPT) fell back to names like search_issues. This came out of an MCP metadata audit.

  • ToolConfig now requires title. Every tool sets a short Title Case title, including search_sentry_tools and execute_sentry_tool.
  • buildServer passes title to registerTool, so it appears as a top-level field in tools/list. I did not use annotations.title.
  • toolDefinitions.json includes title for the UI and docs consumers. measure-tokens now counts title, so its numbers match the wire.
  • adding-tools.md documents the new field.

Naming choices:

  • The *_monitor tools that act on cron monitors say "Cron Monitor", for example "Find Cron Monitors".
  • get_profile is "Get Transaction Profile".
  • whoami is "Who Am I".
  • The docs tools are "Search Sentry Docs" and "Get Sentry Doc".
  • The deprecated aliases end in "(Deprecated)", for example "Search AI Conversations (Deprecated)".

Impact

  • Token cost: +453 against current main (47,100 → 47,553), about 1%.
  • New tools must set title. The type requires it, and tools.test.ts checks that every title is non-empty and unique.
  • server.all-tools.test.ts checks that tools/list exports each tool's title.

Merge order

Merge this after #1989 (alwaysLoad). Both PRs add an it() block at the same spot in server.all-tools.test.ts, so this one will need a small rebase once #1989 lands.

Checks: package-scoped tsc for @sentry/mcp-core and @sentry/mcp-cloudflare, root lint, check:generated (clean after rebasing onto main), and the mcp-core test suite. I didn't run the root tsc, test or build scripts, because they run the cloudflare build, which uploads source maps to Sentry.

via @dcramer.

--

View Session [Sentry]

Clients that show a friendly tool name fell back to the snake_case name
because no tool sent the MCP `title` field. Add a required `title` to
ToolConfig, set a Title Case title on every tool, pass it to
registerTool so it appears top-level in tools/list, and export it in
the generated tool definitions.

Tests check that titles are unique and non-empty and that tools/list
exports them.

Co-Authored-By: David Cramer <23610+dcramer@users.noreply.github.com>
@vercel

vercel Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sentry-local Ready Ready Preview Nov 5, 2026 6:56pm UTC

Request Review

@dcramer
dcramer merged commit c5d7cc4 into main Nov 5, 2026
34 of 36 checks passed
@dcramer
dcramer deleted the feat/mcp-tool-titles branch November 5, 2026 19:15
sentry-junior Bot added a commit that referenced this pull request Nov 5, 2026
#1991 made `title` required on every tool. Command tools take it from
the command path, title-cased (`sentry issue list` → `Issue List`).

Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>

This branch was successfully deployed

1 active and 1 inactive deployments
Preview — 27fc471a Deployed Nov 5, 2026 by vercel[bot]
Actions — 27fc471a Deployed Nov 5, 2026 by sentry-junior[bot] via eval #1579
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.

1 participant