brain-v42
Persistent, searchable memory for coding agents over MCP — typed knowledge, explicit session lifecycles, project coordination, and nightly consolidation.
Sessions: start or replay a session (
brain_session_start), resume it (brain_session_resume), keep it alive (brain_session_heartbeat), attach artifacts (brain_session_capture), then end it with a summary and next focus (brain_session_end) or abandon it with a reason (brain_session_abandon).Discover & invoke any tool: the default
compactprofile exposes only the session tools plus two gateways —brain_find_tool(natural-language tool search) andbrain_call_tool(invoke by name). SetBRAIN_MCP_PROFILE=nativeto expose everything directly.Store typed knowledge rather than notes: decisions (with WHY and supersession chains), validated learnings, snippets with intent, executable runbooks, ADRs, tickets and roadmaps.
Retrieve it well:
brain_searchfuses PostgreSQL full-text with pgvector semantic search and re-ranks with a cross-encoder; embeddings are optional and degrade gracefully to FTS.Traverse relationships:
brain_get_neighborsandbrain_graph_pathover an optional Neo4j projection rebuilt from PostgreSQL.Coordinate across projects: focus slots, project context, cross-project tickets, clustering and orphan/duplicate curation.
Track observable delivery: versioned contracts bound to PRs, persisted CI evidence, integration, claims and issuer attestations (ledger only, policy lives in red-rail).
Consolidate nightly: the
Provides a relationship graph in Neo4j, enabling graph traversal, entity merging, and link backfill from a relational ledger.
Allows using Ollama as an embeddings provider via the OpenAI-compatible backend to enable semantic search.
Allows using OpenAI-compatible embedding endpoints, including OpenAI, for semantic search.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@brain-v42search for the decision about using pgvector"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
brain-v42
Persistent, typed project memory exposed through the Model Context Protocol (MCP). It stores decisions, learnings, snippets, runbooks, architecture decision records (ADRs), project focus, tickets, claims, and delivery evidence. PostgreSQL is the source of truth; PostgreSQL full-text search and pgvector provide retrieval, with an optional cross-encoder reranker. Neo4j is an optional relationship projection.
brain-v42 is a Python 3.12 application built with FastMCP 3.x, SQLAlchemy's async engine, Pydantic, and Alembic. Release 0.6.10 adds per-client issuer patterns and the delivery attestation API v1.1 on top of migrations 063 and 064 and recovery contract v22 (no new migration). See Architecture, MCP tool reference, and Operations for detailed contracts and procedures.
Architecture
MCP clients ── HTTP loopback /mcp (production) or stdio (development)
│
brain-v42 / FastMCP
├── PostgreSQL 16 + pgvector (source of truth)
├── unified embedding and reranking endpoint (optional)
└── Neo4j 5 (optional relationship projection)MCP transport: production = HTTP loopback http://127.0.0.1:8765/mcp; configuration default and dev/fallback = stdio.
PostgreSQL is the single source of truth. Neo4j is a disposable projection fed by a
relational ledger/outbox — it can always be rebuilt from PostgreSQL, never the other
way around. The canonical path is active in production since 22 July 2026; design and
evidence live in docs/ARCHITECTURE.md and the
graph ledger runbook.
Embeddings are optional. When the configured service is unavailable, search falls
back to full-text retrieval and writes can be stored without an embedding for later
backfill. The default embedding and reranking endpoint is http://localhost:8003; the
reranker uses the unified embedding endpoint :8003/rerank. The shim backend uses
the bundled service protocol; openai supports OpenAI-compatible embeddings, and
cohere selects the Cohere-style reranking protocol (POST /v1/rerank, as implemented
by TEI, Jina and vLLM). Hosted providers receive the
text sent for embedding or reranking.
EMBEDDING_DIMENSION defaults to 1536 and must be at most 2000 for pgvector's HNSW
index. The ORM supports another dimension, but migrations 002, 005, 009, and 014
create 1536-dimensional columns. A non-default dimension therefore needs a deliberate
schema adjustment and index rebuild after migration. Changing the document prefix on
an existing corpus requires regenerating embeddings with
scripts/regen_embeddings.py.
Related MCP server: Muninn
Quick start
git clone https://github.com/hawkixs/brain-v42
cd brain-v42
uv sync --extra dev --python 3.12
source .venv/bin/activate
cp .env.example .envSet POSTGRES_URL in .env for your PostgreSQL instance. For the repository's local
Compose stack, set its PostgreSQL password consistently in .env, prepare the
Compose-required Neo4j and embedding bearer secret files, and create the external
brain-net network. Start the database services with docker compose up -d postgres neo4j; the optional embedding services require their model and GPU setup. See
docker-compose.yml and Operations for the complete local
service setup and secret handling.
For a local Compose setup, create its external network and secret files:
docker network create brain-net
install -d -m 0700 .secrets
read -rsp "Neo4j password: " PW
(umask 0022; printf 'neo4j/%s\n' "$PW" > .secrets/neo4j-auth)
unset PW
(umask 0177; openssl rand -hex 32 > .secrets/embedding-shim-bearer)Run migrations and start the stdio server:
export POSTGRES_URL="$(grep -E '^POSTGRES_URL=' .env | cut -d= -f2-)"
BRAIN_ALEMBIC_ALLOW_PROD=1 alembic upgrade head
python -m brain_v42.mcp.serverThe opt-in is required only when the database name is exactly brain; never export it persistently.
Alembic reads its URL from the environment, not directly from .env, and rejects DSN
query parameters: use the plain postgresql+asyncpg://user:password@host:port/db form. Production HTTP
requires bearer authentication; an empty token is refused unless the explicit
development-only unauthenticated option is enabled. For local stdio MCP configuration:
claude mcp add brain-v42 -- python -m brain_v42.mcp.serverMCP tools
The compact profile is the default. It keeps the nine session lifecycle tools visible;
other tools are discovered through the catalog search gateway and invoked through the
catalog call gateway.
The native profile exposes the registered tools directly. Inputs are bounded and
HTTP request bodies have a configured size cap. Graph traversal tools require graph
support to be enabled.
Domain | Tools |
Search and generic CRUD |
|
Graph traversal |
|
Session lifecycle |
|
Focus slots |
|
Project context |
|
Decisions |
|
Learnings |
|
Snippets |
|
Runbooks |
|
ADRs |
|
Tickets and planning |
|
Observable delivery |
|
Dream and graph maintenance |
|
Roadmap |
|
Measured facts |
|
Claims |
|
Workflow guidance |
|
Full catalog, signatures, authorization behavior, and limits:
docs/MCP_TOOLS.md. The two catalog gateways of the compact profile,
brain_find_tool and brain_call_tool, are provided by the profile rather than registered
as tools, so they are not counted above.
Observable delivery
Delivery records connect a ticket contract, pull request binding, persisted CI and
integration observations, and requester acceptance. The observer is a separate
process. Reads use persisted observations; they do not call GitHub. Delivery mutations
can be disabled while reads and completion checks for existing contracts remain
available. Tickets can carry a planned target_release.
Ledger and policy: the boundary with red-rail
Brain is the ledger; red-rail is policy. Brain
stores attestation facts and validates their shape: the kind syntax, bounded JSON
payload, and server-computed digest. It does not judge what a kind means or derive a
completion refusal from an attestation. Attestations are append-only. red-rail reads
the rows to calculate delivery policy and DORA metrics. The API contract is published
as docs/contracts/delivery_attestations.json
for consumers that must not import brain_v42.
Sessions
The user controls every session boundary: start, resume, end and abandon are
explicit commands, never inferred by a hook, an agent or a client. Sessions capture
the durable artifacts they produced into an exclusive ledger, and closing is
fail-closed: captured knowledge or an explicit "nothing to capture" reason, never
silence.
HTTP connections also have server-managed agent trace sessions. See
docs/OPERATIONS.md, "Agent traces and the inactivity sweep",
for their lifecycle. Derived capture and exact absorption are limited to the
connections on which an operator session was observed. Operator sessions can bind to
focus slots and relay their focus. Unbound session end and project-focus updates reject
a shrink below 70 percent unless the operator explicitly overrides the guard.
After 24 hours without a heartbeat, an open session exposes is_stale=true; the marker
is derived, the persistent status stays open, and only the 7-day server-side sweep
ever abandons a session without an explicit user command.
See docs/MCP_TOOLS.md for the full lifecycle and slot contracts.
Configuration (.env)
The settings surface is defined in src/brain_v42/config.py. Common settings:
# Required
POSTGRES_URL=postgresql+asyncpg://brain:change-me-locally@localhost:5433/brain
# Optional search services
EMBEDDING_SERVICE_URL=http://localhost:8003
EMBEDDING_DIMENSION=1536
BRAIN_EMBEDDING_BACKEND=shim # shim or openai
BRAIN_EMBEDDING_MODEL=qodo
BRAIN_EMBEDDING_QUERY_PREFIX=
BRAIN_EMBEDDING_DOCUMENT_PREFIX=
RERANKER_URL=http://localhost:8003
BRAIN_RERANK_BACKEND=shim # shim or cohere
# Optional graph features
GRAPH_ENABLED=false
GRAPH_LEDGER_WRITE_ENABLED=false
# MCP behavior
BRAIN_MCP_PROFILE=compact # compact or native
BRAIN_MCP_TRANSPORT=stdio # stdio or http
# Optional services
METRICS_ENABLED=false
BRAIN_DELIVERY_ENABLED=false
LOG_LEVEL=INFOFor a no-GPU setup, point the OpenAI-compatible backend at a local endpoint such as Ollama:
set BRAIN_EMBEDDING_BACKEND=openai, EMBEDDING_SERVICE_URL to its URL,
BRAIN_EMBEDDING_MODEL to a model it serves, and EMBEDDING_DIMENSION=768.
HTTP transport binds to loopback by default and requires a non-empty MCP_HTTP_TOKEN.
Never place MCP_HTTP_TOKEN or MCP_HTTP_DREAM_TOKENS in the shared .env; keep
them in private, permission-restricted secret files such as mcp-token.env.
GRAPH_PROJECTOR_*, provider API
keys, and delivery observer credentials also require private configuration. Set
EMBEDDING_DIMENSION unprefixed: the ORM reads it from the environment directly.
See
docs/OPERATIONS.md for the complete variable and secret
reference.
Network trust model
The deployment targets personal agents on a trusted LAN. MCP, PostgreSQL and Neo4j bind to loopback; metrics and automation default to loopback.
Embedding topology: production/default = local unified endpoint http://localhost:8003; the personal dev-pc deployment is a superseded rollback/reference path, now private.
The reranker uses the unified embedding endpoint :8003/rerank. Treat the endpoint as
LAN-exposed until you have verified its live bind, and never expose it or the MCP port
to the Internet. Repository configuration alone does not prove the live firewall state.
Dream mode
Nightly agent pipeline (scripts/dream.sh: scan → clean → connect → synth → promote →
reorg) plus server-side ticket-extraction, roadmap-curation and session-sweep jobs. Mutating phases are guarded
by per-phase settings and capability scopes. They ship disabled and dry by default;
operators can arm or suspend them. Provider chains can be configured, and phase
execution records which provider served it. See Architecture
and Operations. Each phase writes
logs/dream/<date>_<project>_<phase>.chain.json; read it, because a green night on
the first provider proves nothing about fallthrough.
Production state
The repository migration target is migration 064. No page in this repository proves a live schema head — measure it, do not read it here:
docker exec brain_v42_postgres psql -U brain -d brain -Atc "select version_num from alembic_version;"The running build names itself: GET /health returns version (the installed
distribution) and alembic_head (the revision shipped with it), both measured, never
written by hand.
Measured facts
The sentence above — measure it, do not read it here — is the rule. The facts registry is the mechanism that enforces it, so the session briefing can state the live schema head, the running release and the declared Dream killswitches without anyone retyping them into a document.
A fact is a named, versioned reader. Each one declares its target, its TTL, its timeout, its policies and the exact shape of the value it returns, and the catalogue is closed: probes are registered once at composition and then frozen, so no runtime caller can install a reader of its own.
What makes a reading trustworthy is not the probe but the source identity, and the
identity a probe is checked against is declared independently by the operator —
never derived from the connection the probe uses. A PostgreSQL reading must match a
cluster system identifier, database, address and port the operator wrote down; a
live_release reading must match the release SHA and package version the release
tooling rendered; a host reading must match a declared hostname. Undeclared means no
fact: the probe is refused at registration and the briefing says which one is missing
and why, rather than leaving a silent gap. This closes the obvious hole — a probe that
reports its own DSN back to you proves nothing about which database it reached.
A measurement has exactly two shapes and no third: Measured, carrying a bounded
canonical JSON value and a digest over it, or Unreadable, carrying a closed
error_code. A timeout, an unexpected identity or an over-large value each produce
an Unreadable that renders as such — never a stale value dressed up as current.
Three targets ship today (production, live_release, host) and the catalogue is
declared in src/brain_v42/facts/composition.py. Read it with brain_fact_list and
brain_fact_get; facts declared briefing=true also render as lines in the session
briefing.
Development
pytest tests/unit -v
pytest --cov=brain_v42 --cov-report=term-missing
ruff check src/ tests/
ruff format --check src/ tests/
mypy src/The project requires Python 3.12.7 or newer; CI targets Python 3.12. Install with
uv sync --extra dev --python 3.12 so the locked Git
dependency and interpreter match CI. Unit tests do not require PostgreSQL. Tests that
need a database require an isolated test database through BRAIN_V42_TEST_DB_URL and
refuse production database targets.
Project layout
brain-v42/
├── src/brain_v42/
│ ├── config.py # settings
│ ├── db/ # SQLAlchemy engine and tables
│ ├── models/ # Pydantic models and contracts
│ ├── repositories/ # PostgreSQL, search, and graph adapters
│ ├── services/ # business logic, delivery, search, and Dream
│ ├── facts/ # measured-fact registry
│ ├── metrics/ # sidecar and collectors
│ ├── automation/ # webhook and dedup runtime
│ └── mcp/ # FastMCP server and tools
├── tests/{unit,integration}
├── alembic/versions/ # migrations shipped in the wheel
├── scripts/ # operational commands
├── services/ # embedding services and supervisor
├── deploy/ # service definitions and installers
└── docs/ # architecture, schema, tools, and operationsThe high-level module graph is acyclic and checked in CI by
scripts/check_module_layering.py. The check is static; runtime imports are not
visible to it.
CI/CD
GitHub Actions is the CI/CD authority. Pull requests run lint, tests, security checks,
and a Docker image build and smoke check on hosted runners. Pushes to main build and
publish the container image; this rail does not deploy it. Version tags build and
publish the wheel and source distribution after verifying that the wheel contains
Alembic migrations and that the tag matches the package version. No rail deploys a
release automatically.
Roadmap
Planned work moves production from a workstation to a dedicated server, deployed by the red-rail release rail as one Compose project: PostgreSQL, Neo4j, the MCP server, metrics sidecar, delivery observer, a one-shot migration service that proves the recovery contract, and Compose-scheduled work. Clients are planned to reach MCP over a private WireGuard network with bearer authentication. The credential model is planned to use one scoped credential per client service (read, write, delivery, or admin), with admin access granted only through time-boxed operator elevation. Delivery attestation issuers are planned to be proven against their credential in attestation API v1.1. After that deployment work, priorities are search and embedding quality, disaster-recovery proof, and metrics. Operators can suspend Dream and re-arm it later.
Versioning
The shipped version is 0.6.10, and it stays
0.xon purpose: a1.0.0would promise a stable interface and a way back, and this project has neither yet.No lossless downgrade is promised, at any version. Several migrations protect stored history: 037 refuses when a session capture would be lost, 039 requires an explicit operator opt-in, 053 refuses once delivery workflow history exists, 054 refuses once a delivery attestation exists, 055 refuses once a claim, a verdict or a fact definition exists, 056 refuses while a project is archived (those two accept a named operator opt-in), 058 refuses once a server-extracted claim exists, 059 refuses while a ticket carries a target_release, and 060 refuses while a focus slot, a slot history row or a slot-bound session exists (both accept a named operator opt-in).
Follow the release's operator runbook for recovery. Keep the repository's migration target in place: the head the release ships, never a lower one. Rollback means selecting a release that supports that head or deploying a forward fix; it never means
alembic downgrade, and never means restoring an older dump over a live database.0.6.0 introduced the
headless-agentsdependency. It is maintained inhawkixs/red-haand pinned to tagv0.5.4inpyproject.toml.
License
Source code: Apache-2.0.
Model weights are not covered by that license. No weights are stored in or distributed by this repository; operators download models from their publishers and accept the applicable terms. See NOTICE before redistributing anything.
Available Tools
11 toolsbrain_call_toolA
Call a tool by name with the given arguments.
Use this to execute tools discovered via search_tools.
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The name of the tool to call | |
| arguments | No | Arguments to pass to the tool |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full responsibility for behavioral disclosure. It only says 'Call a tool by name' and does not mention potential side effects, error behavior, dynamic execution risk, or that it can invoke arbitrary tools with arbitrary consequences. This is a significant gap for an execution tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, zero filler, action stated first. The second sentence provides essential context (use after search_tools) without redundancy. Excellent front-loading.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple 2-parameter tool, the description covers the core action and usage context. However, without an output schema or annotations, it omits return value behavior and error handling, which an agent might need when invoking arbitrary tools. It is adequate but not comprehensive.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the schema already documents both parameters. The description adds marginal value by linking parameters to 'given arguments' from search_tools, but does not enrich semantics beyond the schema. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states a specific verb ('Call') and resource ('a tool by name with the given arguments'), and differentiates itself from discovery tools by positioning it as the execution step after search_tools. This makes it unambiguous against siblings like brain_find_tool.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'Use this to execute tools discovered via search_tools' gives clear context of when to invoke it (after discovery) and implies it is not for searching. It does not explicitly exclude session-management siblings, but the usage context is sufficient for a generic dispatcher.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
brain_find_toolA
Search for tools using natural language.
Returns matching tool definitions ranked by relevance, in the same format as list_tools.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Natural language query to search for tools |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the behavioral burden. It discloses that the tool returns definitions rather than executing tools, indicates relevance ranking, and references the list_tools output format. It does not explicitly state lack of side effects, but the search/return framing makes the read-only behavior clear enough.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences with no filler. The action is front-loaded and the return behavior is described in the second sentence. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a one-parameter, output-schema-bearing search tool, the description is complete: it states the query source, the result type, ranking behavior, and output format. No critical invocation information is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% and the single 'query' parameter is already described as a natural language query. The description adds no additional semantic detail beyond the schema, so the baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states a specific action ('Search for tools') and resource ('tool definitions'), and adds that results are ranked by relevance. This differentiates it from session lifecycle tools and brain_call_tool without ambiguity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies its use case: natural-language discovery of tools, as opposed to session manipulation or direct tool invocation. However, it does not explicitly name alternatives or state when not to use it, such as preferring list_tools for browsing all tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
brain_session_abandonBDestructiveIdempotent
Abandon a session only from an explicit user command.
An agent tracer is the only session the server opens or closes on its own; no hook and no auto-close may invoke this lifecycle boundary.
| Name | Required | Description | Default |
|---|---|---|---|
| reason | Yes | ||
| session_id | Yes | ||
| expected_client_key | Yes | Client identity expected for the addressed session UUID. The pair must match before any session mutation. This is an isolation guard, not authentication. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare destructiveHint=true and idempotentHint=true, which cover the destructive nature. The description adds the explicit-user-command constraint and notes that only an agent tracer session is server-managed. However, it does not describe consequences (e.g., irreversibility, impact on session data) beyond the annotation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences, front-loaded with the primary action and constraint. The second sentence adds relevant context about the agent tracer without bloat.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a mutation tool with three required parameters and no output schema, the description is sparse. It does not explain what 'abandon' entails versus brain_session_end, what the response contains, or prerequisites beyond the schema. The annotation and schema cover only part of the operational context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is only 33% (only expected_client_key has a description). The tool description provides no parameter information, failing to compensate for the low coverage. An agent receives no guidance on session_id or reason beyond the schema's minimal type constraints.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a clear action ('abandon a session') and resource, and adds a critical constraint ('only from an explicit user command'). It does not explicitly differentiate from the sibling brain_session_end, but the user-command qualifier hints at a distinct lifecycle role.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives explicit when-to-use guidance ('only from an explicit user command') and when-not-to-use ('no hook and no auto-close may invoke this lifecycle boundary'). It does not name alternative tools directly, but the constraint is unambiguous.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
brain_session_bindAIdempotent
Bind an open operator session to one focus slot, from an explicit user command.
Once per session; binding the same slot again is a replay. From then on the
session's end writes that slot only, never the project base:
expected_focus_revision is the slot revision returned here. Refusals:
session_not_open, session_is_agent_trace, session_already_bound,
slot_not_found, slot_closed, slot_project_mismatch, slot_busy.
An agent tracer is the only session the server opens or closes on its own; no hook and no auto-close may invoke this lifecycle boundary.
| Name | Required | Description | Default |
|---|---|---|---|
| slot_id | Yes | ||
| session_id | Yes | ||
| expected_client_key | Yes | Client identity expected for the addressed session UUID. The pair must match before any session mutation. This is an isolation guard, not authentication. |
Output Schema
| Name | Required | Description |
|---|---|---|
| slot_id | Yes | |
| slot_body | Yes | |
| session_id | Yes | |
| slot_revision | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations cover the safety profile (readOnly=false, idempotent=true, destructive=false), and the description goes further: it explains the downstream effect that `end` writes only the bound slot and never the project base, enumerates all seven refusal codes, and states the replay rule. This is unusually rich disclosure and consistent with the idempotentHint.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The key action and trigger are front-loaded in the first sentence, then constraints and refusals follow. The prose is dense with internal jargon and the refusal list is unglossed, but every sentence carries substantive information rather than filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With an output schema present, return values need not be described, and the description adequately covers lifecycle rules, replay behavior, and failure modes. Its one real gap is the near-total absence of input-parameter meaning, which is left to a thin schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is only 33%, with just `expected_client_key` documented inline. The description explains none of the three input parameters (slot_id, session_id, expected_client_key); the only parameter it references, `expected_focus_revision`, is not an input at all. It therefore fails to compensate for the coverage gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The opening clause states a specific verb and resource: 'Bind an open operator session to one focus slot.' It clearly belongs to the session lifecycle family, though it never names a sibling (e.g. brain_session_end/start) to disambiguate which lifecycle call to pick, so it stops short of full sibling differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives a clear triggering condition ('from an explicit user command') and a negative constraint ('no hook and no auto-close may invoke this lifecycle boundary'), plus once-per-session/replay semantics. What is missing is an explicit comparison to the adjacent lifecycle siblings an agent might otherwise choose.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
brain_session_captureAIdempotent
Attach durable artifacts from an explicit user command — to repair or refine.
No longer a compulsory ritual. With derived capture armed, artifacts
created during the session are attributed without this call, and end
no longer demands a receipt. What this tool is for now: attaching
something the derivation could not see — created outside the window,
on another connection, or in another project — and saying so on the
record.
It never steals: an artifact already attributed stays where it is.
An agent tracer is the only session the server opens or closes on its own; no hook and no auto-close may invoke this lifecycle boundary.
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | ||
| knowledge_ids | Yes | ||
| expected_client_key | Yes | Client identity expected for the addressed session UUID. The pair must match before any session mutation. This is an isolation guard, not authentication. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover idempotency and non-destructiveness; the description adds that already-attributed artifacts are left in place and that this is not a compulsory step. It does not disclose return behavior, permissions, or failure modes, so with annotations lowering the bar, this is adequate but not rich.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Purpose and usage are front-loaded in the first paragraphs, but the explanation includes redundant historical context ('No longer a compulsory ritual' followed by the derived-capture explanation) and a final lifecycle sentence that is tangential. It is readable but not every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a side-effecting 3-parameter tool with no output schema and with annotations, the description provides enough usage context to call correctly, including scope and idempotent ownership behavior. It lacks explicit statements about return values or errors and uses jargon like 'derived capture' and 'receipt' without definition, so completeness is only moderate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema describes only expected_client_key; the description adds meaning for knowledge_ids as durable artifacts and specifies their suitability (outside window/connection/project), plus the 'never steals' rule for already-attributed IDs. It does not discuss session_id or expected_client_key beyond schema, so it only partially compensates for the 33% schema description coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The first sentence identifies a specific action ('Attach durable artifacts') and trigger ('from an explicit user command'). Later text narrows the scope to artifacts the derivation could not see, which differentiates it from automatic capture, though it does not name sibling tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly states when to use the tool: for artifacts created outside the session window, on another connection, or in another project. It also says when it is not needed, because derived capture attributes normal session artifacts and `end` no longer requires a receipt. It stops short of naming sibling alternatives, but the when/when-not guidance is strong.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
brain_session_endADestructiveIdempotent
End a session from an explicit user command, on judgement alone.
nothing_to_capture_reason is now OPTIONAL. The old rule — a non-empty
ledger XOR a written reason — measured whether the client had DECLARED
its work. Derived capture feeds that signal from the server, and a check
is hollow the moment the thing it checks can influence its own signal;
worse, it made a session whose ledger the server had filled impossible
to close. Give a reason if you have one to give; a blank one is still
refused, because saying nothing and saying " " are not the same act.
What end still requires is what the server cannot produce for you:
a summary and a next focus. It REPORTS unattributed_in_window —
artifacts of this project created during the session that belong to no
ledger — as a measure, never a gate. It cannot refuse a close, and a
session cannot improve it by doing nothing.
For a bound session, expected_focus_revision is the SLOT revision (from
bind, resume, or relay's slot.revision), never started_focus_revision.
An agent tracer is the only session the server opens or closes on its own; no hook and no auto-close may invoke this lifecycle boundary.
| Name | Required | Description | Default |
|---|---|---|---|
| summary | Yes | ||
| next_focus | Yes | Jugement et engagements pour la session suivante — ce qui n'est pas dérivable automatiquement (ex : ne pas publier ce brouillon et pourquoi, une échéance et sa raison, une décision opérateur à respecter). N'y recopie pas l'état mesurable (révision de schéma, HEAD git, arbre propre, résultat de suite de tests) : il est déjà recalculé à chaque briefing depuis la source réelle, et une copie manuelle se périme en silence. | |
| session_id | Yes | ||
| expected_client_key | Yes | Client identity expected for the addressed session UUID. The pair must match before any session mutation. This is an isolation guard, not authentication. | |
| expected_focus_revision | Yes | ||
| nothing_to_capture_reason | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| session | Yes | Persistent state of one explicitly controlled concurrent session. |
| replayed | Yes | |
| focus_diff | No | |
| focus_at_end | Yes | |
| current_focus | Yes | |
| focus_outcome | Yes | Persisted outcome of the one focus update attempted while ending. |
| focus_revision_at_end | No | |
| current_focus_revision | Yes | |
| unattributed_in_window | Yes | |
| remaining_open_session_count | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare destructiveHint/idempotentHint/readOnlyHint=false, so the safety profile is covered. The description goes beyond them with substantive behavior: nothing_to_capture_reason is now optional, a blank-string reason is still rejected, `unattributed_in_window` is reported as a measure and cannot gate the close, and summary/next_focus are server-underivable requirements. It stops short of 5 because it never says what happens to the session record after the close or whether the operation is reversible.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The purpose is front-loaded in the first sentence, which is good. But several sentences are rhetorical justification for a design decision ('a check is hollow the moment the thing it checks can influence its own signal', 'saying nothing and saying " " are not the same act') that consumes space without changing how an agent calls the tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return values need not be explained, and the description covers the lifecycle constraint, the required-judgement inputs, and the revision-slot trap. It is nearly sufficient for a 6-parameter destructive lifecycle tool; the missing piece is an explicit statement of how to choose this over brain_session_abandon.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is only 33%, so the description must compensate, and it does for the two least-obvious parameters: expected_focus_revision is pinned to the SLOT revision from bind/resume/relay and explicitly not started_focus_revision, and nothing_to_capture_reason's new optionality plus blank-refusal rule is spelled out. summary, session_id, and nothing_to_capture_reason's value shape remain undocumented in both places, keeping it below 5.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The opening sentence gives a specific verb+resource ('End a session') and adds the operative scope ('from an explicit user command, on judgement alone'), which an agent can act on. It does not, however, name or contrast against the obvious sibling brain_session_abandon, so the boundary between the two lifecycle endings is left to inference.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It states both a positive trigger (explicit user command, agent judgement) and an explicit prohibition ('no hook and no auto-close may invoke this lifecycle boundary'), which is real when/when-not guidance. The gap is that it never names the alternative tool (brain_session_abandon) for the case where a session should be terminated without a summary/focus.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
brain_session_heartbeatA
Refresh an open session from an explicit user command.
An agent tracer is the only session the server opens or closes on its own; no hook and no auto-close may invoke this lifecycle boundary.
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | ||
| expected_client_key | Yes | Client identity expected for the addressed session UUID. The pair must match before any session mutation. This is an isolation guard, not authentication. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=false, so the mutation is known. The description adds that this is a lifecycle boundary and only for explicit commands, but it does not explain what 'refresh' does to the session (e.g., extends timeout) or any side effects. It adds some context but not deep behavioral detail.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, zero wasted words. The main purpose is front-loaded, and the critical usage constraint is stated immediately after. Perfectly concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a mutation with no output schema, the description is somewhat bare. It does not specify behavior for a closed session, failure modes, or the return value. The agent can infer that the session must be open from the phrase 'open session', but it is not explicitly guaranteed. Given the simplicity, this is adequate but not complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 50%: session_id has only a format, while expected_client_key has a detailed description. The tool description itself does not elaborate on either parameter. Since the missing session_id is self-explanatory (a UUID), the description does not need to compensate much, but it still adds no meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('refresh') with a clear resource ('an open session') and immediately distinguishes itself from siblings by stating it is the only lifecycle boundary invoked by explicit user command, not by hooks or auto-close. This fully differentiates it from brain_session_start/end/resume.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly states when to use the tool ('from an explicit user command') and, more importantly, when not to use it ('no hook and no auto-close may invoke this lifecycle boundary'). This gives the agent a clear decision rule, even though alternatives are not named directly.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
brain_session_listARead-onlyIdempotent
List sessions only in response to an explicit user command.
An agent tracer is the only session the server opens or closes on its own; no hook and no auto-close may invoke this lifecycle boundary.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| offset | No | ||
| status | No | open | |
| project_key | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint and idempotentHint, so the safe read-only nature is established. The description adds meaningful behavioral context beyond those annotations: the server only auto-opens/closes an agent tracer session, and hooks/auto-close must never invoke this boundary. This is valuable context, though it does not describe list ordering, pagination, or return shape.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences with no filler. The primary action is front-loaded, and the critical invocation restriction is placed in the supporting sentence. Every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description fully covers the unusual invocation policy, which is likely the highest-risk aspect of this tool. However, with no output schema and no parameter descriptions, the agent still lacks context about what a session entry contains, which status filters mean, and what the list response looks like. Adequate for basic invocation but with meaningful gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description does not compensate for any of the four parameters. The schema provides names, types, defaults, and the status enum, but meanings like 'stale', 'abandoned', and 'closed_inactive' are left unexplained, and project_key semantics are not addressed. With zero coverage, the description should add parameter context but does not.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a clear verb and resource ('List sessions') and adds a distinctive policy constraint: it runs only on explicit user command. It does not explain what kinds of sessions are returned or how this differs from sibling read tools, but the core purpose is unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives an explicit when-to-use condition ('only in response to an explicit user command') and an explicit when-not-to-use condition ('no hook and no auto-close may invoke this lifecycle boundary'). It does not mention sibling alternatives, but the trigger and exclusion are clear enough for an agent to decide.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
brain_session_relayADestructiveIdempotent
Relay an open session onto its slot, or its project base: capture, end, restart.
One transaction: the named knowledge_ids are captured into the old session,
the handover is written under a compare-and-swap, the old session ends, and
a successor opens under new_client_key; its briefing follows. Two forms,
and exactly one revision per call.
Bound session: send expected_slot_revision; the handover (at most 4,000
characters) becomes the slot body and the successor stays on the slot. A
closed slot or a stale revision changes nothing and leaves the session open.
Unbound session: send expected_focus_revision, the BASE revision; the
handover becomes the project's whole base focus and the successor is
unbound. A stale revision (focus_revision_conflict) changes nothing and
leaves the session open, unlike end, which closes anyway. SHRINK GUARD: a
handover under 70% of the current base focus is refused (base_focus_shrink,
both lengths in the message), because it REPLACES the whole base: carry the
durable content over. Only an operator relay may pass allow_focus_shrink = true; a guard mod never can.
An equal replay returns the same successor with replayed = true; any other
payload on an ended session is terminal_conflict. The successor's next end
or relay sends result.slot.revision (bound: the SLOT revision, from bind,
resume, or relay) or result.focus_revision (unbound: the new BASE revision),
never started_focus_revision for a bound one.
A guard mod the operator explicitly enabled may make this call as a standing
user command, and only this one (Amendment — slot relay (ADR #34)); with
initiator = 'guard_mod' it is refused while
BRAIN_SESSION_RELAY_GUARD_MOD_ENABLED is false.
An agent tracer is the only session the server opens or closes on its own; no hook and no auto-close may invoke this lifecycle boundary.
| Name | Required | Description | Default |
|---|---|---|---|
| summary | Yes | ||
| handover | Yes | ||
| initiator | Yes | ||
| session_id | Yes | ||
| knowledge_ids | No | ||
| new_client_key | Yes | Stable identity for one intended session. Reuse it for every retry of that session; use a distinct stable key for each parallel session. | |
| allow_focus_shrink | No | ||
| expected_client_key | Yes | Client identity expected for the addressed session UUID. The pair must match before any session mutation. This is an isolation guard, not authentication. | |
| expected_slot_revision | No | ||
| expected_focus_revision | No | ||
| nothing_to_capture_reason | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| slot | No | |
| session | Yes | Persistent state of one explicitly controlled concurrent session. |
| briefing | No | |
| replayed | Yes | |
| focus_revision | No | |
| ended_session_id | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations only supply the safety profile (destructive, idempotent); the description adds the substantive behavior: single-transaction CAS semantics, that stale revisions or a closed slot change nothing and leave the session open, the 70% shrink guard and its refusal code, the replayed/terminal_conflict outcomes, and the guard-mod environment gate. This is far beyond what the annotations convey.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Long but front-loaded, with labeled cases (Bound/Unbound/Shrink Guard) that let an agent scan rather than parse prose. Most sentences carry operational payload, though the trailing paragraph about the agent tracer is loosely tied to the call itself.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a destructive, 11-parameter lifecycle tool with an output schema, it covers transaction shape, guarded failure modes, and revision hand-off to the successor's next call. Remaining gaps: no explanation of `summary` or `nothing_to_capture_reason`, and the handover length figure differs from the schema constraint.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is only 18% across 11 parameters, so the description must compensate, and it does for the critical ones: `expected_slot_revision` vs `expected_focus_revision` (base revision), `handover` content and its replacement semantics, `knowledge_ids` capture, `new_client_key` successor identity, `allow_focus_shrink` operator-only rule, and `initiator`. Gaps remain for `summary` and `nothing_to_capture_reason`, and it states a 4,000-character handover cap that conflicts with the schema's 10,000 maxLength.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('relay an open session onto its slot, or its project base') and unpacks it into the concrete lifecycle it performs: capture, end, restart via a successor. It explicitly distinguishes itself from the sibling `end` ('unlike `end`, which closes anyway'), so an agent can route between them without opening schemas.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives explicit branching conditions: bound sessions require `expected_slot_revision`, unbound sessions require `expected_focus_revision`, and it names the failure modes that select differently. It also states when the tool may be invoked by a guard mod (operator-enabled, env flag on). It doesn't frame the choice against alternatives like `brain_session_capture` or `brain_session_resume` beyond the `end` contrast, so not a full 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
brain_session_resumeBRead-onlyIdempotent
Resume an open session from an explicit user command.
An agent tracer is the only session the server opens or closes on its own; no hook and no auto-close may invoke this lifecycle boundary.
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | ||
| expected_client_key | Yes | Client identity expected for the addressed session UUID. The pair must match before any session mutation. This is an isolation guard, not authentication. |
Output Schema
| Name | Required | Description |
|---|---|---|
| session | Yes | Persistent state of one explicitly controlled concurrent session. |
| briefing | No | |
| slot_closed | No | |
| current_focus | Yes | |
| open_session_count | Yes | |
| current_focus_revision | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations declare readOnlyHint=true and destructiveHint=false, yet the description calls this a "lifecycle boundary" that the server "opens or closes," and the schema states the client-key pair must match "before any session mutation." Resuming a session is an intentional state change, so the description directly contradicts the readOnly annotation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences with the primary action stated first and the lifecycle constraint second; no filler. Slightly cryptic phrasing ("agent tracer") costs it a point but the structure is sound.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return values need not be explained, and the description covers the invocation precondition (explicit user command). However, for a mutating lifecycle operation it omits what state changes on resume, error behavior for a closed/unknown session, and any detail on the undocumented session_id parameter.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is only 50%: expected_client_key is well documented in-schema, but session_id carries no description anywhere. The description adds no meaning about either argument (e.g., which session UUIDs are valid, what happens if the client key mismatches), so it fails to compensate for the coverage gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a specific verb (resume) and resource (an open session) and scopes it to explicit user commands, which separates it from the lifecycle-start path in siblings like brain_session_start. It does not name any sibling explicitly, so differentiation still requires inference from names alone.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
"From an explicit user command" gives a clear when-to-use trigger, and the second sentence effectively says when NOT to use it (no hooks, no auto-close). It stops short of naming the alternative to call for a brand-new session, so the routing guidance is good but not complete.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
brain_session_startAIdempotent
Start or replay a concurrent session from an explicit user command.
An agent tracer is the only session the server opens or closes on its own; no hook and no auto-close may invoke this lifecycle boundary.
| Name | Required | Description | Default |
|---|---|---|---|
| client_key | Yes | Stable identity for one intended session. Reuse it for every retry of that session; use a distinct stable key for each parallel session. | |
| project_key | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| session | Yes | Persistent state of one explicitly controlled concurrent session. |
| briefing | No | |
| replayed | Yes | |
| open_session_count | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover idempotency, destructiveness, and read-only hints. The description adds value by disclosing that this is a controlled lifecycle boundary and that the server only opens/closes agent tracer sessions on its own. This is behavioral context beyond what annotations provide, with no contradiction.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences with no filler. The main action and trigger are front-loaded, and the second sentence earns its place by preventing incorrect automatic invocation.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The output schema and annotations cover return values and safety traits, so those gaps are acceptable. However, the required project_key parameter is left unexplained, and the relationship between 'start/replay' and the sibling brain_session_resume is not clarified. This is a meaningful gap for an agent deciding which session tool to call.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds no parameter-level meaning. The schema describes client_key well, but project_key has no description and is required; the description does not compensate for that gap. With 50% schema coverage, the description should have provided at least some project/session context.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Start or replay') and the resource ('a concurrent session'), plus the specific trigger ('from an explicit user command'). It does not explicitly distinguish itself from sibling brain_session_resume, and 'replay' vs 'resume' creates some potential overlap.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives explicit when-to-use context: only from an explicit user command. It also gives a clear exclusion: no hook and no auto-close may invoke this lifecycle boundary. It does not name alternatives like brain_session_resume, but the trigger guidance is strong.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v0.6.7- Added
brain_session_bind - Added
brain_session_relay - Changed
brain_session_resume1 field changed- added
Output schema / properties / slot_closedAdded value: +{ + "default": false, + "type": "boolean" +}
9 tool updates
v0.6.1- First observed
brain_call_tool - First observed
brain_find_tool - First observed
brain_session_abandon - First observed
brain_session_capture - First observed
brain_session_end - First observed
brain_session_heartbeat - First observed
brain_session_list - First observed
brain_session_resume - First observed
brain_session_start
TDQS
Scored across 11 tools
Each of the nine session lifecycle tools targets a distinct action (start, resume, heartbeat, end, abandon, bind, capture, relay, list), and the two meta tools (call_tool, find_tool) are clearly separate. However, the extremely verbose and overlapping conceptual descriptions (repeated 'agent tracer' boilerplate, relay containing capture/end/restart) could still cause occasional misselection between related lifecycle boundaries.
All tools use snake_case with a consistent 'brain_' prefix. Session tools follow 'brain_session_<action>' and meta tools follow 'brain_<verb>_tool', which is a minor deviation in pattern but still predictable and readable.
11 tools is well within the ideal range and each tool earns its place: nine cover the complex session lifecycle (create, resume, refresh, end, abandon, bind, capture, relay, list) and two provide dynamic tool discovery/execution. No tools appear redundant or missing from a count perspective.
The session lifecycle surface is comprehensive: start, resume, heartbeat, end, abandon, bind, capture artifacts, relay handover, and list. A dedicated 'get_session' or 'status' tool might be a minor gap, but list and resume likely cover most needs, and the meta tools add extensibility.
Maintenance
Related MCP Connectors
Persistent memory and cross-session learning for AI coding assistants (hosted remote MCP).
Hosted MCP memory for coding agents: persistent across sessions, editable markdown, team sharing.
- memnodeOAuthdev.memnode
Persistent, inspectable memory for AI agents with lineage, correction, and a hosted MCP endpoint.
Persistent AI memory shared across Claude, ChatGPT, coding agents, and compatible MCP clients.
Related MCP Servers
- AlicenseAqualityBmaintenanceProvides persistent memory for AI coding agents via MCP, enabling teams to share and recall facts across sessions. Automatically captures, classifies, and curates knowledge from supported transcript sources.1833 npm1AGPL 3.0
- AlicenseNot gradedqualityBmaintenanceProvides persistent memory for AI coding agents via MCP, allowing them to recall fragility, decisions, and bugs across sessions.406 npm3MIT
- AlicenseNot gradedqualityDmaintenanceProvides persistent memory and task management for coding agents via MCP tools, enabling mid-session recall and capture of durable knowledge.360 npm11MIT
- AlicenseNot gradedqualityAmaintenanceProvides persistent, searchable memory across coding projects and machines, letting agents record and retrieve projects, reusable assets, sessions, decisions, commits, and handoffs via MCP.2Apache 2.0