Skip to main content
Glama

Attach a bot to an agent

attach_agent_bot
DestructiveIdempotent

Attach an already connected bot belonging to your account. Never accepts a bot token. Returns awaiting_confirmation and an approval_url: the owner must approve these exact parameters in Cormak, then retry with the SAME request_id. No work starts before approval. Reuse request_id on retries.

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": {
      "request_id": "<request_id>",
      "agent_id": "<agent_id>",
      "telegram_bot_id": "<telegram_bot_id>"
    },
    "name": "attach_agent_bot"
  }
}

Input Schema

NameRequiredDescriptionDefault
agent_idYes
request_idYesStable UUID for this exact operation. Reuse on retries. Never change it to retry an unknown result.
telegram_bot_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations, it discloses the two-phase gate ('No work starts before approval'), the exact return signals (awaiting_confirmation and approval_url), and the request_id idempotency contract on retry. This is consistent with idempotentHint=true and destructiveHint=true — the mutation is real but explicitly deferred until approval, so no annotation contradiction.

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?

Four short sentences, front-loaded with the identity of the operation, then the constraint, then the return/approval behavior, then the retry rule. No filler and no repetition of schema or annotation content.

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

Completeness5/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 and an asynchronous approval gate, the description covers the precondition, the response shape, and the retry protocol — the things an agent cannot get from the structured fields. Nothing material for correct invocation is missing.

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 only 33% (only request_id is documented there), so the description has to carry weight: it establishes that telegram_bot_id must be an already-connected bot owned by the caller rather than a token, and reinforces the stable-request_id retry rule. agent_id is left to inference from the tool name (the bot is attached to that agent), which is a small residual gap.

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 first sentence names a specific verb (attach) and resource (an already connected bot belonging to your account), and the clause 'Never accepts a bot token' cleanly separates this from any connect/credential-establishing sibling such as connect_agent_channel or sync_bot. An agent can tell what this does without opening the schema.

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 clearly states the precondition (bot must already be connected and owned by the account) and the operating procedure (expect awaiting_confirmation, get the owner's approval, then retry with the same request_id). It does not explicitly name which sibling to use instead when the bot is not yet connected, so it stops short of full when/when-not routing.

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.