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.

blind_since= (with blind=true) sets when the blind session began, so list_facts_by_key_prefix hides feed comms keyed before it; the default is the session's start minus 60 s.

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": {
      "agent_id": "<agent_id>"
    },
    "name": "bind_agent"
  }
}

Input Schema

NameRequiredDescriptionDefault
blindNoOptional, default false. true = blind session for a model fitting: from now on the wake bundle, every related/nearest list and the search tools on this session leave out keys under letter-to-emily:, project:*:wake:fresh-eye:, project:*:fitting:, project:*:agent:*:model-upgrade: and earlier fittings' feed comms (comms:...:feed-q-, feed-a-, fresh-eye-, ack-fresh-eye-), plus keyless facts whose text starts with a fitting product marker (FINDINGS, COMPARE, MODEL TRIAL ...); search_facts' include_granted then defaults to false. Remembered for the session; pass false to turn it off. get_fact by exact key is not filtered; list_facts_by_key_prefix lists only feed comms whose key epoch is at or after the moment blind turned on (this run's own feed).
scopeNoOptional project slug (project:<slug>:*). The handed-back closing and opening notes are then chosen the way wake_status(scope=...) checks them: project:<slug>:agent:<id>:self-note:* or the global agent:<id>:self-note:*, newest wins. It also becomes the session's workspace scope, as switch_workspace(<slug>) does, so later wake_status() and load_context() use it too. Defaults to the session's workspace scope. Without any scope the newest note is labelled with its project and other projects' notes are listed by key.
agent_idYesAgent identity slug (e.g. 'emily_code_4.7'). Empty string clears the binding.
blind_sinceNoOptional, with blind=true: the blind start in unix epoch seconds (a fitting passes its FITTING_STARTED_EPOCH); list_facts_by_key_prefix then hides feed comms keyed before it, and it must lie within 24 h before and 300 s after the server clock. Default: the session's start minus 60 s. On an already-blind session the earlier start is kept.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / blind / description
      Previous value: -"Optional, default false. true = blind session for a model fitting: from now on the wake bundle, every related/nearest list and the search tools on this session leave out keys under letter-to-emily:, project:*:wake:fresh-eye:, project:*:fitting:, project:*:agent:*:model-upgrade: and earlier fittings' feed comms (comms:...:feed-q-, feed-a-, fresh-eye-, ack-fresh-eye-). Remembered for the session; pass false to turn it off. get_fact by exact key is not filtered; list_facts_by_key_prefix lists only feed comms whose key epoch is at or after the moment blind turned on (this run's own feed)."New value: +"Optional, default false. true = blind session for a model fitting: from now on the wake bundle, every related/nearest list and the search tools on this session leave out keys under letter-to-emily:, project:*:wake:fresh-eye:, project:*:fitting:, project:*:agent:*:model-upgrade: and earlier fittings' feed comms (comms:...:feed-q-, feed-a-, fresh-eye-, ack-fresh-eye-), plus keyless facts whose text starts with a fitting product marker (FINDINGS, COMPARE, MODEL TRIAL ...); search_facts' include_granted then defaults to false. Remembered for the session; pass false to turn it off. get_fact by exact key is not filtered; list_facts_by_key_prefix lists only feed comms whose key epoch is at or after the moment blind turned on (this run's own feed)."
  2. Changed2 schema fields changed
    • changedInput schema / properties / blind / description
      Previous value: -"Optional, default false. true = blind session for a model fitting: from now on the wake bundle, every related/nearest list and the search tools on this session leave out keys under letter-to-emily:, project:*:wake:fresh-eye:, project:*:fitting:, project:*:agent:*:model-upgrade: and earlier fittings' feed comms (comms:...:feed-q-, feed-a-, fresh-eye-, ack-fresh-eye-). Remembered for the session; pass false to turn it off. get_fact by exact key and list_facts_by_key_prefix are not filtered."New value: +"Optional, default false. true = blind session for a model fitting: from now on the wake bundle, every related/nearest list and the search tools on this session leave out keys under letter-to-emily:, project:*:wake:fresh-eye:, project:*:fitting:, project:*:agent:*:model-upgrade: and earlier fittings' feed comms (comms:...:feed-q-, feed-a-, fresh-eye-, ack-fresh-eye-). Remembered for the session; pass false to turn it off. get_fact by exact key is not filtered; list_facts_by_key_prefix lists only feed comms whose key epoch is at or after the moment blind turned on (this run's own feed)."
    • addedInput schema / properties / blind_since
      Added value: +{
      +  "description": "Optional, with blind=true: the blind start in unix epoch seconds (a fitting passes its FITTING_STARTED_EPOCH); list_facts_by_key_prefix then hides feed comms keyed before it, and it must lie within 24 h before and 300 s after the server clock. Default: the session's start minus 60 s. On an already-blind session the earlier start is kept.",
      +  "type": "number"
      +}
  3. Changed1 schema field changed
    • changedInput schema / properties / blind / description
      Previous value: -"Optional, default false. true = blind session for a model fitting: from now on the wake bundle and every related/nearest list on this session leave out keys under letter-to-emily:, project:*:wake:fresh-eye:, project:*:fitting: and project:*:agent:*:model-upgrade:. Remembered for the session; pass false to turn it off. get_fact by exact key is not filtered."New value: +"Optional, default false. true = blind session for a model fitting: from now on the wake bundle, every related/nearest list and the search tools on this session leave out keys under letter-to-emily:, project:*:wake:fresh-eye:, project:*:fitting:, project:*:agent:*:model-upgrade: and earlier fittings' feed comms (comms:...:feed-q-, feed-a-, fresh-eye-, ack-fresh-eye-). Remembered for the session; pass false to turn it off. get_fact by exact key and list_facts_by_key_prefix are not filtered."
  4. Changed2 schema fields changed
    • addedInput schema / properties / blind
      Added value: +{
      +  "description": "Optional, default false. true = blind session for a model fitting: from now on the wake bundle and every related/nearest list on this session leave out keys under letter-to-emily:, project:*:wake:fresh-eye:, project:*:fitting: and project:*:agent:*:model-upgrade:. Remembered for the session; pass false to turn it off. get_fact by exact key is not filtered.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / scope
      Added value: +{
      +  "description": "Optional project slug (project:<slug>:*). The handed-back closing and opening notes are then chosen the way wake_status(scope=...) checks them: project:<slug>:agent:<id>:self-note:* or the global agent:<id>:self-note:*, newest wins. It also becomes the session's workspace scope, as switch_workspace(<slug>) does, so later wake_status() and load_context() use it too. Defaults to the session's workspace scope. Without any scope the newest note is labelled with its project and other projects' notes are listed by key.",
      +  "type": "string"
      +}
  5. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the annotations, it discloses that the binding is persisted to mcp_sessions.agent_id, survives setup_account(mode='restore'), and is re-hydrated automatically. It also explains defaulting behavior for wake_status and load_context, idempotency, and clearing semantics.

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 binding behavior is front-loaded, and the later paragraphs explain persistence, session timing, and blind-mode details. The description is somewhat long, but most sentences carry operational meaning for this multi-parameter tool.

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?

Given the mutation annotation, full schema coverage, and absence of an output schema, the description supplies the key operational context an agent needs: when to bind, what changes, how defaults work, persistence behavior, and how to clear it. Nothing essential for correct invocation appears missing.

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?

Schema description coverage is 100%, so the schema already documents all four parameters in detail. The description provides useful high-level context for agent_id, blind, blind_since, and scope, but mostly restates or summarizes what the schema already supplies.

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 description states a specific verb and resource: 'Bind a sticky agent identity to this MCP session.' It immediately clarifies the effect on wake_status and load_context, making the tool distinguishable from per-call identity usage.

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?

It clearly says to call once near the start of a session and ideally from the boot recipe, and it explains idempotent re-binding and clearing with agent_id=''. It gives clear usage context but does not explicitly compare against alternative approaches beyond per-call override.

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.