Skip to content

mcp: tools/list shows write tools to read-only callers #1446

Closed

Description

@ajianaz

What

Since #1441, a read-only token can call the MCP read tools over POST /mcp. Write tools return a tool error (isError: true). But tools/list still advertises every tool, so an agent may plan around tools it cannot use and only learn at call time.

Why

Filtering tools/list by access (uteke_mcp::READ_ONLY_TOOLS for Access::ReadOnly) gives read-only clients an accurate catalog. Before changing it, check what uteke-cloud's /mcp advertises to read-only keys so the two stay aligned (MCP is CORE).

Testing

Add a test: tools/list with Access::ReadOnly returns exactly the names in READ_ONLY_TOOLS (minus the dispatch alias uteke_room_document). Access::Full is unchanged.

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