Skip to main content
Glama

Attach MCP server

attach_mcp_server

Attach an existing MCP server so its tools are available to the agent.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idYesTarget agent's id (from list_agents / create_agent / get_catalog view=agents).
server_idYesId of the MCP server (from get_catalog view=mcp_servers).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / agent_id / description
      Added value: +"Target agent's id (from list_agents / create_agent / get_catalog view=agents)."
    • addedInput schema / properties / server_id / description
      Added value: +"Id of the MCP server (from get_catalog view=mcp_servers)."
  2. First observed

TDQS

A4/5.0
Behavior5/5

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

The description states that attaching the server makes its tools available to the agent, which is the key behavioral effect. The annotations are minimal (no readOnlyHint, no destructiveHint), so the description carries the burden and adequately discloses the side effect. It also implies resource association without destroying anything, consistent with annotations.

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?

The description is a single concise sentence that directly states the purpose‘s verb and resource, front-loading the core action and outcome. Every word earns its place, with no fluff or redundancy.

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?

Given that this is a simple binary operation with only two well-documented parameters and no output schema, the description is complete enough. It covers the purpose and result. However, it could benefit from a note about idempotency (e.g., what happens if the server is already attached) or permissions, which would make it fully complete.

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?

The input schema already provides complete descriptions for both parameters (agent_id and server_id) with sources. The description adds no additional parameter-level meaning beyond what the schema states, so the baseline of 3 applies given 100% schema coverage.

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

Purpose4/5

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

The description clearly states the action (attach) and the resource (an existing MCP server) and the purpose (make its tools available to the agent). It distinguishes it from create_mcp_server (creating vs attaching) and from other attach_* tools by the specific resource type, though it doesn't explicitly differentiate from those siblings.

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

Usage Guidelines3/5

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

The description implies the tool is for attaching server resources that already exist, which is clear from the word 'existing'. However, it does not provide explicit guidance on when to use this over alternatives like create_mcp_server or when not to use it (e.g., if the server is already attached). No mention of prerequisites like the server being available or whether agents need specific permissions.

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