Skip to main content
Glama

ctxstore — memory that follows you across models

Bind Agent Identity

bind_agent
Idempotent

Bind a sticky agent identity to this MCP session. Once bound, wake_status and load_context default to this agent_id when called without an explicit agent_id= arg — no need to pass identity on every call. Per-call override still works.

Persisted to mcp_sessions.agent_id (migration 0008), so the binding survives setup_account(mode='restore') and the server re-hydrates it automatically on the next tool call.

Call once near the start of a session, ideally from your boot recipe (HANDLER: bind_agent agent_id=). Idempotent: re-binding the same agent_id is a no-op. Pass agent_id='' to clear the binding.

Input Schema

NameRequiredDescriptionDefault
agent_idYesAgent identity slug (e.g. 'emily_code_4.7'). Empty string clears the binding.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, and destructiveHint=false, so the write-once/idempotent/no-destroy profile is covered structurally. The description adds real value beyond that: persistence to mcp_sessions.agent_id (migration 0008), survival across setup_account(mode='restore'), and automatic re-hydration. It does not describe the return value, but the behavioral footprint is well disclosed.

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?

The core action is front-loaded in the first sentence, with persistence, call timing, and clearing handled in short follow-on paragraphs. The migration-number citation is slightly gratuitous but overall every sentence carries information an agent needs.

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 single-parameter, no-output-schema, annotation-covered tool, the description covers effect, lifetime, idempotency, and teardown thoroughly. Nothing an agent needs to bind identity correctly is missing.

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

Parameters5/5

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

Schema coverage is 100% and the schema already documents the empty-string clearing convention, which sets a baseline of 3. The description goes further, explaining the sticky-default behavior the parameter enables and that per-call override still works, adding real semantic meaning beyond the schema.

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 a sticky agent identity to this MCP session.' It also names the downstream consumers (wake_status, load_context) that read the binding, letting an agent distinguish this tool from those siblings without opening 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?

Explicitly says when to call ('once near the start of a session, ideally from your boot recipe'), states the exact no-op condition (re-binding the same agent_id), and documents the clearing path (agent_id=''). Override behavior of downstream calls is also spelled out.

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.