Skip to main content
Glama

Bind this session to an xats identity

xats_bind

Binds an MCP session to its pre-registered Claude Code identity using the provided single-use bind code, resolving unknown_agent errors before calling other xats tools.

Instructions

Bind this MCP session to the Claude Code identity that the xats SessionStart hook already registered for you. Call it once per session, before or after other xats tools, when they report unknown_agent. Pass the bind code from the xats context block (a value like "K7QM-2XPD"). Codes are single use and expire after 15 minutes. Never ask the user for the code and never invent one: it is provided in the injected context, and registration on the daemon already happened. If no code is available, use register_agent instead, which binds the session the same way.

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": {
      "code": "<code>"
    },
    "name": "xats_bind"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesBind code from the xats context block, for example "K7QM-2XPD"

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses single-use codes, a 15-minute expiry, and that daemon-side registration already occurred, plus firm operator guidance not to ask the user or fabricate a code. It stops short of describing what a successful bind returns or what failure modes beyond unknown_agent look like, which costs it a point.

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 action and followed by the trigger, the parameter's source, and the fallback, so an agent reading only the first sentence still knows what to do. The trailing clause about daemon registration reads as somewhat appended and is the one element that could be merged upward, but no sentence is filler.

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 annotations and no output schema, the description covers the essentials: where the input comes from, its lifetime, and the fallback path. The remaining gap is return/error behavior after the call, which a reader must discover empirically.

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 schema cannot: the code's provenance (the injected context block), a concrete example value, single-use semantics, and its 15-minute lifetime. That is genuine semantic enrichment beyond a documented string field.

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 ('Bind this MCP session to the Claude Code identity') and names the actor responsible for prior setup (the SessionStart hook). It also implicitly separates itself from register_agent by saying registration already happened.

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 an explicit trigger ('when they report unknown_agent'), a frequency constraint ('once per session'), and an explicit alternative with its condition ('If no code is available, use register_agent instead'). Nothing is left to inference about when to pick this tool.

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