Skip to content

Grants survive a tool being withdrawn, so a transport swap could re-enable writes #106

Description

@guidovizoso

google-drive has four grants pointing at tools the connector no longer advertises:

  • google-drive/copy_file
  • google-drive/create_file
  • google-drive/download_file_content
  • google-drive/get_file_permissions

They are inert only because the REST adapter does not advertise them. listForAgent joins
plugin_grants to mcp_tools, so a grant naming a tool that is not in the tool list offers nothing
to a model.

That is a property of the transport, not of the grant. Google's Drive MCP server advertises all eight
names, and the adapter deliberately uses the same names character for character so grants survive a
transport swap. So setting transport: "mcp" back on the catalogue entry — one field, done when the
Developer Preview opens — silently re-enables create_file and copy_file on a connector whose whole
description says read-only.

Two things stop it being exploitable today, and neither is the grant table: the requested scope is
drive.readonly, so Google refuses a write; and both names are in the entry's writeTools, so the
policy engine sees them as writes. That is the belt-and-braces working as intended. But the grant row
is the thing an administrator reads to answer "what may this Bot do", and it currently says something
that is only false by accident.

Suggested fix

Have refreshTools delete grants for tools that are no longer advertised, in the same transaction
that replaces the tool list. A tool a connector has stopped offering is a tool nothing should hold,
and the tool list is already replaced wholesale rather than merged for the same reason.

Worth deciding deliberately rather than defaulting: pruning means a vendor briefly mis-reporting its
tool list would drop grants an administrator then has to make again. The alternative is to surface
them — show a granted tool the connector does not advertise, and say so — which keeps the
administrator's decision and makes the discrepancy visible.

Found in review of #97, where the grants were left rather than pruned silently.

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