Skip to content

mark codebase-retrieval as read-only with the MCP readOnlyHint annotation #170

Description

@Xilous

when auggie runs as an MCP server (auggie --mcp), the tools/list response for codebase-retrieval carries no annotations object at all. verified on 0.30.0 and 0.36.0 by sending initialize and tools/list over stdio: the tool comes back with name, description and inputSchema only.

the MCP spec defines tool annotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint) so a client can tell a read-only tool from one that changes state. some clients use readOnlyHint to decide whether a tool may run without a confirmation prompt while the agent is in a read-only planning mode. without the hint, codebase-retrieval is treated as a possible write, so the client asks for approval before every single retrieval even though the tool only reads the index. allow-list rules on the client side do not override that check, only the annotation does.

please set annotations to { readOnlyHint: true } on codebase-retrieval (and codebase-retrieval-raw where it is exposed) in the tools/list response. idempotentHint true and openWorldHint false would also be accurate for this tool.

to reproduce:

  1. run auggie --mcp --mcp-auto-workspace
  2. send initialize, notifications/initialized, then tools/list over stdio
  3. inspect result.tools[0].annotations, which is undefined

environment: auggie 0.36.0 (commit 7c61e5bb), windows 11, node 26.3.1.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions