Skip to main content
Glama

Bind channel_session_id to caller

bind_channel

Rebinds an already-registered agent session to a new channel session ID announced by the channel proxy. Use when your current MCP session is already bound to your agent; fresh or resumed sessions should reconnect instead.

Instructions

Low-level rebind tool for Claude channel delivery. Bind the caller session's agent row to a channel_session_id produced by the cross-agent-teams-mcp channel proxy. Most callers should prefer register_agent({ agent_type: "claude-code", channel_session_id, ... }) on the unified registration path. Call this when you need to rebind an already-registered row after the proxy announces a new csid AND your current MCP session is already bound to your agent. On a fresh or resumed MCP session (e.g. after a context clear or resume) the daemon has not yet associated this session with your agent, so bind_channel returns unknown_agent — use reconnect({ ui_pid: $PPID }) instead, which recovers your identity by process id and rebinds the channel in one step. Rejects proxy callers (role=channel_proxy). Rejects unknown csid (no live proxy sink attached).

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": {
      "channel_session_id": "<channel_session_id>"
    },
    "name": "bind_channel"
  }
}

Input Schema

NameRequiredDescriptionDefault
channel_session_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the whole burden and does so: it discloses the precondition (session must already be bound to the agent), the failure mode on unbound sessions (returns unknown_agent), and two explicit rejection classes (proxy callers with role=__channel_proxy__, and unknown csid with no live proxy sink). That is unusually rich disclosure for an unannotated mutation tool.

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?

Front-loaded with the low-level framing and the preferred alternative before the detail, and every sentence adds a routing or failure rule. It is dense and long-sentenced, but no clause is filler; slight readability cost keeps it off a 5.

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 one-parameter tool with no output schema, the description covers preconditions, alternatives, and error outcomes thoroughly. The only gap is that it never says what a successful rebind returns or whether it is idempotent, which matters given there is no output schema to consult.

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 has 0% description coverage on the single parameter, so the description must compensate; it does by stating provenance (a channel_session_id 'produced by the cross-agent-teams-mcp channel proxy') and the validity constraint (must have a live proxy sink attached, else rejected). It stops short of format/examples, so not a 5.

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?

States a specific verb and resource ('rebind ... caller session's agent row to a channel_session_id') and immediately frames itself as a low-level tool with two named, higher-level alternatives (register_agent, reconnect). An agent can distinguish it from register_agent and reconnect without reading any schema.

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

Usage Guidelines5/5

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

Gives explicit when-to-use ('already-registered row after the proxy announces a new csid AND your current MCP session is already bound to your agent'), explicit when-not-to-use ('fresh or resumed MCP session ... use reconnect({ ui_pid: $PPID }) instead'), and names the preferred default path (register_agent). This is a full routing decision tree.

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