Skip to main content
Glama

Add or remove an agent's tools

set_agent_tools
Idempotent

Add or remove tools on an agent by key (from list_agent_tools). Removing keeps the tool's settings, so adding it again restores them. Approval settings for app actions do not change: actions that need approval still wait for the person. The answer has previous (the tools before), for undo.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "agent_id": "<agent_id>"
    },
    "name": "set_agent_tools"
  }
}

Input Schema

NameRequiredDescriptionDefault
addNoTool keys to add.
removeNoTool keys to remove.
agent_idYesThe agent to change.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Beyond the annotations (idempotent, non-destructive), the description discloses that removal preserves the tool's settings and that re-adding restores them, and that approval requirements for app actions are unaffected by the change. It also discloses the return payload ('previous'), which compensates for the absent output schema.

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

Conciseness4/5

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

Short and front-loaded: purpose first, then the key source, then the two behavioral caveats, then the return value. Every sentence carries information, though the final sentence about the answer reads slightly awkwardly.

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 three-parameter mutation tool with no output schema, the description covers the mutation semantics, key sourcing, reversibility, and return shape. Only edge cases such as invalid keys or simultaneous add/remove of the same key are left unaddressed.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: the array elements are tool keys obtainable from list_agent_tools, not arbitrary strings. It does not clarify interaction when add and remove are supplied together in one call.

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?

The description opens with a specific verb pair and resource: add or remove tools on an agent. It immediately names the key-space (keys from list_agent_tools), which distinguishes it from sibling mutation tools like set_agent_knowledge or update_gateway_tools.

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?

It gives a clear operating context by routing the agent to list_agent_tools to obtain valid keys, and explains the reversal path for removals. It does not spell out explicit when-not-to-use conditions, but the intended use is unambiguous.

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.

Resources