Skip to content

feat(server): add MCP tool annotations to all tools for marketplace compliance - #375

Merged
gaurav-singh-9227 merged 5 commits into
mainfrom
annotations-per-tool
Aug 26, 2026
Merged

feat(server): add MCP tool annotations to all tools for marketplace compliance#375
gaurav-singh-9227 merged 5 commits into
mainfrom
annotations-per-tool

Conversation

@gaurav-singh-9227

Copy link
Copy Markdown
Collaborator

What

Adds complete MCP tool annotations (title, readOnlyHint, destructiveHint, idempotentHint, openWorldHint) to all 45 server.tool() registrations, with values audited against each tool's actual behavior (HTTP verbs in utils, side effects like app uploads and session creation, in-memory store usage).

Why

Required for marketplace submissions:

  • Claude Connectors Directory — "All tools must include a title and the applicable readOnlyHint or destructiveHint"; the submission portal flags tools missing titles or annotations.
  • OpenAI app submission — pre-submission checklist requires accurate readOnlyHint, openWorldHint, and destructiveHint on every tool, matched to actual behavior.

Annotation values

Category Hints Tools
Read-only (29) readOnly: true, idempotent: true all list/get/fetch tools, instruction-only setup tools (setupBrowserStackAutomateTests, Percy setup/scan tools, prepareSelfHealingPlan, RCA tools)
Create/run (13) readOnly: false, idempotent: false startAccessibilityScan, createAccessibilityAuthConfig, takeAppScreenshot, runAppTestsOnBrowserStack, live-session tools, TM create/upload/addResult tools
Overwrite-style updates (3) readOnly: false, destructive: true, idempotent: true updateTestCase, updateTestRun, managePercyBuildApproval
Open world (1) openWorld: true runBrowserLiveSession only — interactive browser on arbitrary third-party sites (per OpenAI's definition: can change publicly visible internet state)

Every tool also gets a human-readable title (e.g. createAccessibilityAuthConfig → "Create Accessibility Auth Config").

Verification

  • npm run build passes (lint + format + 276/276 tests + tsc)
  • Wire-verified with a real MCP stdio handshake: all 44 exposed tools return complete annotations in tools/list
  • Tests updated to bind the handler from the last server.tool() argument so the inserted annotations object doesn't break positional assumptions

Notes

  • getFailuresInLastRun (observability.ts) got annotations too but is currently never exposed — addObservabilityTools is missing from toolAdders in server-factory.ts (pre-existing; flagged separately, not fixed here).

🤖 Generated with Claude Code

gaurav-singh-9227 and others added 5 commits August 25, 2026 14:46
…ance

Add title, readOnlyHint, destructiveHint, idempotentHint, and
openWorldHint to every server.tool registration (45 tools), with values
matched to each tool's actual behavior:

- readOnlyHint: true for fetch/list/get/setup-instruction tools; false
  for tools that create, upload, run, or modify state
- destructiveHint: true for overwrite-style updates (updateTestCase,
  updateTestRun, managePercyBuildApproval)
- idempotentHint: true for readers and same-args-same-result updates;
  false for create/run/upload tools
- openWorldHint: true only for runBrowserLiveSession (interactive
  browser on arbitrary third-party sites); false elsewhere
- title: human-readable display name on every tool

Required for Claude Connectors Directory (title + hints are mandatory)
and OpenAI app submission (accurate readOnlyHint/openWorldHint/
destructiveHint required per tool).

Tests updated to bind the handler from the last server.tool argument so
the added annotations object doesn't shift positional assumptions.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Second half of the per-tool annotation change: accessibility,
appautomate, percy-sdk, rca-agent, selfheal, testmanagement tool files
plus test updates that bind the handler from the last server.tool
argument.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Continuation of the per-tool annotation change.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Final part of the per-tool annotation change.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Final file of the per-tool annotation change.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@gaurav-singh-9227
gaurav-singh-9227 merged commit c9c655e into main Aug 26, 2026
5 checks passed
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.

3 participants