Skip to main content
Glama

Set agent tool access

set_agent_tool_access
DestructiveIdempotent

Replace which of a gateway server's tools an agent may call, and with which scopes. Access decides what the agent sees and can call at all; the approval pipelines still decide every call it makes. The agent's next tool listing reflects the change, and calls check live access before they run.

Input Schema

NameRequiredDescriptionDefault
modeYesnone (no tools), selected (exactly the tools listed) or all (every current and future tool).
toolsNoExact downstream tool names for mode selected, as list_gateway_server_tools reports them (without the slug prefix). No wildcards.
scopesNoThe scopes the agent may call with; any granted scope works with any granted tool. Empty exactly when mode is none.
revisionYesThe grant's current revision from list_agent_tool_access, or 0 for an agent and server never configured. A stale revision is refused.
agent_slugYesThe agent's slug, from list_agents.
server_slugYesThe gateway server's slug, from list_gateway_servers.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare destructiveHint=true and idempotentHint=true, but the description adds real behavioral context the annotations cannot: the effect is immediate ('the agent's next tool listing reflects the change') and enforced at call time ('calls check live access before they run'), plus the crucial separation from approval policy. It does not explicitly state that previously granted tools/scopes are wiped on replace, which is the main destructive consequence an agent should be warned about.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences with the action front-loaded, followed by the access-vs-approval distinction and the timing guarantee. Nothing is redundant with the title or restated.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive, idempotent grant-replacement tool with six required-or-optional params and no output schema, the description covers semantics, timing, and enforcement adequately. The missing piece is an explicit warning that existing grants are overwritten rather than merged, which is the most consequential behavior left to inference.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so mode values, tool naming, scope rules, and the revision/staleness contract are already fully documented in the schema. The description adds only the passing phrase 'with which scopes' and no additional parameter meaning, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb and resource: 'Replace which of a gateway server's tools an agent may call, and with which scopes.' This cleanly separates it from the read-side sibling list_agent_tool_access and from unrelated setters like set_gateway_scope_headers.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description frames the tool's role against the approval pipeline ('access decides what the agent sees... approval pipelines still decide every call'), giving clear context for when this tool matters. It stops short of explicit when-not-to-use guidance or naming the alternative used to read current grants, which is implied only via the schema's reference to list_agent_tool_access.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.