Skip to content

Enforce complete tool hint annotations with a linter #1143

Description

@dcramer

Every tool in the catalog must declare readOnlyHint and destructiveHint in its annotations block. Right now several write tools (add-issue-note, analyze-issue-with-seer, create-dsn, create-project, create-team) have no annotations at all, while others declare only one of the two hints. This creates ambiguity for any routing logic, client-side confirmation gates, or server-side filters that rely on these values.

Scope

  • Audit all tools in packages/mcp-core/src/tools/catalog/ and catalog-runtime/ for missing or partial annotations blocks.
  • Add readOnlyHint and destructiveHint to every tool that lacks them.
  • Add a deterministic test or CI lint rule that fails if any registered tool is missing either hint — so gaps can't be reintroduced silently. Something like iterating allTools and asserting both fields are explicitly true or false, not undefined.

Known gaps (as of reviewed commit 3705c15)

  • add-issue-note — no destructiveHint
  • analyze-issue-with-seer — no readOnlyHint or destructiveHint
  • create-dsn — no destructiveHint
  • create-project — no destructiveHint
  • create-team — no destructiveHint
  • update-dsn, update-issue, update-project — have destructiveHint: true but no explicit readOnlyHint: false

Related: sentry-geoffg/readOnlyHint-changes branch adds server-side filtering keyed on readOnlyHint; that filter is only as good as the annotations it reads.

--

View Junior Session in Sentry

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions