Skip to content

Add support for MCP tool annotations #505

@yamadashy

Description

@yamadashy

The Model Context Protocol 2025-03-26 specification added support for tool annotations, which provide additional metadata about a tool's behavior. Once the MCP SDK is updated to support annotations, we should enhance our MCP tools implementation to include appropriate annotations.

Example of future implementation in readRepomixOutputTool.ts:

mcpServer.tool(
  'read_repomix_output',
  'Description...',
  {
    outputId: z.string().describe('ID of the Repomix output file to read'),
  },
  async ({ outputId }) => { /* implementation */ },
  {
    title: 'Read Repomix Output File',  // User-friendly title for UI display
    readOnlyHint: true,                 // Indicates this tool does not modify its environment
    openWorldHint: false                // Indicates this tool does not interact with external systems
  }
);

Tasks

  • Monitor updates to the MCP SDK (@modelcontextprotocol/sdk) for annotation support
  • Add appropriate annotations to each of our tool implementations:
    • read_repomix_output
    • file_system_read_file
    • file_system_read_directory
    • pack_codebase
    • pack_remote_repository

References

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions