Skip to content

feat(mcp): Add searchable tool catalog#1041

Open
dcramer wants to merge 3 commits into
mainfrom
codex/mcp-tool-catalog
Open

feat(mcp): Add searchable tool catalog#1041
dcramer wants to merge 3 commits into
mainfrom
codex/mcp-tool-catalog

Conversation

@dcramer
Copy link
Copy Markdown
Member

@dcramer dcramer commented Jun 3, 2026

Add a searchable MCP tool catalog so ordinary Sentry operations can live behind experimental search_tools and execute_tool instead of all needing top-level MCP registration. The direct surface remains centrally declared, and the shared availability path keeps skill, constraint, capability, release-mode, and schema filtering consistent across direct and catalog execution.

Tool Catalog

Move ordinary tools into a flat tools/catalog/ tree, keep gateway/wrapper tools under tools/special/, and move shared implementation helpers into tools/support/. Each catalog tool remains its own module while the central surface policy decides which tools are exposed directly through tools/list.

Experimental Gateway

search_tools and execute_tool are marked experimental for now. Standard tools/list omits them, experimental mode includes them, and the eval mock stdio server opts into experimental mode so behavior evals can exercise discovery plus execution.

Search/Execute Contract

search_tools returns structured JSON instead of markdown, with only the data needed to call execute_tool: name, description, executable input schema, and MCP safety annotations. The returned input schema is filtered for the active session, so organization, project, and region arguments that will be injected from constraints are not shown to the model.

{
  "query": "issue",
  "results": [
    {
      "name": "get_issue_details",
      "description": "...",
      "inputSchema": { "type": "object", "properties": {} },
      "annotations": { "readOnlyHint": true }
    }
  ]
}

MCP Disclosure And Behavior

Tests cover standard and experimental tool disclosure, agent-mode use_sentry disclosure, catalog-only discovery and execution, lean search result metadata, constrained schema filtering, per-tool snapshot baselines, and eval cases that require model behavior through search_tools plus execute_tool.

Validated with pnpm run tsc, pnpm run lint, pnpm run test, pnpm --filter @sentry/mcp-server-evals run build, pnpm run measure-tokens, and a mock stdio MCP smoke check. Token measurement reports 22 stable direct tools and 14,012 total tokens.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 6cf7fce. Configure here.

Comment thread packages/mcp-core/src/tools/special/use-sentry/handler.ts
@dcramer dcramer force-pushed the codex/mcp-tool-catalog branch 2 times, most recently from 387ce53 to 7ee1c65 Compare June 3, 2026 13:30
@dcramer dcramer marked this pull request as ready for review June 3, 2026 13:42
Comment thread plugins/sentry-mcp-experimental/agents/sentry-mcp.md
@dcramer dcramer force-pushed the codex/mcp-tool-catalog branch from 7ee1c65 to 27df69d Compare June 3, 2026 14:10
@dcramer dcramer marked this pull request as draft June 3, 2026 14:11
@dcramer dcramer force-pushed the codex/mcp-tool-catalog branch from 27df69d to 52ecd68 Compare June 3, 2026 14:13
dcramer and others added 2 commits June 3, 2026 16:28
Move ordinary Sentry MCP tools into a flat catalog with a central direct-exposure policy. Add search_tools and execute_tool so long-tail tools can stay off the top-level MCP surface while still using normal skill, constraint, capability, and schema handling.

Keep use_sentry as a separate special wrapper and update generated definitions, plugin allowed tools, docs, and regression tests for MCP tools/list disclosure and catalog execution.

Co-Authored-By: GPT-5 Codex <codex@openai.com>
Forward experimental mode into the embedded use_sentry MCP server so it applies the same capability gates as direct and catalog execution. Remove the duplicate pre-filter and add regression coverage for project-scoped sessions without trace, replay, or profile capabilities.

Co-Authored-By: GPT-5 Codex <codex@openai.com>
@dcramer dcramer force-pushed the codex/mcp-tool-catalog branch from 52ecd68 to 25d3bb6 Compare June 3, 2026 14:28
@dcramer dcramer marked this pull request as ready for review June 3, 2026 14:48
Comment thread packages/mcp-core/src/tools/catalog/index.ts
Route preprod snapshot agent guidance through the catalog gateway when experimental tools are available and avoid advertising unavailable catalog workflows in the stable plugin.

Mark get_profile as open-world because it reads from Sentry APIs, with regression coverage for the annotation.

Co-Authored-By: GPT-5 Codex <codex@openai.com>
@dcramer dcramer deployed to Actions June 3, 2026 15:25 — with GitHub Actions Active
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