Skip to content

Add MCP tool annotations and migrate from deprecated server.tool() to registerTool() #32

Closed

Description

@TMHSDigital

Why

  • No tool declares annotations. MCP hosts use readOnlyHint, destructiveHint, idempotentHint, and openWorldHint to decide when to prompt the user and how to display a tool. Right now a host can't tell steam_getPlayerCount from steam_grantInventoryItem, so the five write tools get no annotation-driven approval UX.
  • Every tool uses server.tool(...), which is marked @deprecated Use registerTool instead in the installed SDK (node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.d.ts).
  • registerTool also supports title and outputSchema/structuredContent, so clients get typed JSON instead of parsing pretty-printed text.

Suggested approach

  • Migrate all 26 tools to registerTool({ title, description, inputSchema, outputSchema?, annotations }).
  • Write tools: destructiveHint: true, readOnlyHint: false, openWorldHint: true. SDK guides and validateStoreAsset: readOnlyHint: true, openWorldHint: false. Read tools: readOnlyHint: true.
  • Add a test that enumerates registered tools and asserts every tool has annotations, and that every tool spreading confirmSchema is marked destructive.
  • Start returning structuredContent for high-traffic tools (appDetails, playerCount, reviews summary).

Done when

No deprecated registrations remain, every tool is annotated, and a test enforces it.

Activity

  1. added
    enhancement
    security
    on Oct 25, 2026
  2. added a commit that references this issue on Oct 25, 2026
    5181573
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementpriority: highsecurity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions