Skip to main content
Glama

brain_state_save

Save structured task or entity state under an exact key so agents can resume precisely; overwrites existing records with the same type and key.

Instructions

Save structured state (task snapshot, entity record) under an exact key - retrieved later by key, never by semantic search. This is the right place for task state an agent must resume precisely; free-text knowledge belongs in brain_remember. data is stored verbatim as JSON (object or array, max 256 KiB); saving again with the same type+key overwrites.

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": {
      "type": "<type>",
      "key": "<key>",
      "data": "<data>"
    },
    "name": "brain_state_save"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYesunique id within the type
dataYesthe state to persist, verbatim
typeYesrecord namespace, e.g. task / order / customer

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.10.0

TDQS

A4.6/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden and does well: it discloses verbatim JSON storage, accepted types (object or array), a 256 KiB size cap, and overwrite semantics when type+key repeat. It does not cover permission/auth requirements or what a save returns, which leaves some behavioral gaps for a write operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tightly packed clauses with zero filler, front-loading the core action before the routing guidance and then the storage constraints. Every sentence adds decision-relevant information.

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 3-parameter write tool with no annotations and no output schema, the description covers format, size limit, overwrite behavior, and retrieval model. The only shortfall is that nothing tells the agent what a successful save returns, which matters slightly more given there is no output schema.

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 baseline is 3, but the description adds real meaning: the composite uniqueness of type+key driving overwrite, the exact-key retrieval contract for 'key', and the verbatim object/array payload with a size bound for 'data'. This goes beyond the schema's terse per-field text.

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 ('Save structured state ... under an exact key') plus concrete examples (task snapshot, entity record). It explicitly contrasts with semantic retrieval and with brain_remember for free-text, so the agent can distinguish it from siblings without opening a 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 an explicit when-to-use rule ('the right place for task state an agent must resume precisely') and an explicit when-not with the named alternative ('free-text knowledge belongs in brain_remember'). It also warns that retrieval is by exact key, never semantic search, which sets expectations for how the data must be written.

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