Skip to main content
Glama

brain_encode

Store a durable learning — a fix, constraint, preference, or decision — as a Markdown note addressed to the next agent, so coding agents keep long-term memory across sessions.

Instructions

Store one durable learning: a fix that worked, a constraint, a preference, a decision.

Start the body with a 2-3 sentence blockquote addressed to the next agent.
Pick an existing cortex when one fits (see brain_list); create a new one only for a new theme.

Input Schema

NameRequiredDescriptionDefault
bodyYes
tagsNo
typeNofact
titleYes
cortexYes
confidenceNo
descriptionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It does disclose two non-obvious behaviors not in the schema: a required body convention (opening blockquote addressed to the next agent) and a cortex-reuse policy. It says nothing about what happens on duplicate or near-duplicate entries, whether confidence is caller-asserted or validated, or what a failed cortex reference does.

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 short imperative lines, zero filler, with the core action stated first and the formatting convention immediately after. Every sentence constrains agent behavior.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema and no annotations, so the description is the only source of behavioral context for a 7-parameter mutation tool. The encoding ritual is well covered, but return values, error behavior, and the valid domain of type/confidence are all absent — an agent can call it, but cannot predict what comes back.

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

Parameters2/5

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

Schema description coverage is 0% across 7 parameters, so the description must compensate and largely does not. It adds genuine meaning for only two — body (required blockquote opener) and cortex (reuse vs. create, cross-referencing brain_list). The type, confidence, tags, description and title parameters get no semantic treatment at all; notably 'type' defaults to 'fact' with no hint of what other values are legal.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource — 'Store one durable learning' — and enumerates the content kinds it accepts (a fix that worked, a constraint, a preference, a decision). That makes it clearly the write path among siblings (brain_list, brain_search, brain_read are all reads). It doesn't explicitly name a write-side sibling such as brain_supersede to contrast against, so it falls short of 5.

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?

Gives real procedural guidance: begin the body with a 2-3 sentence blockquote for the next agent, prefer an existing cortex and consult brain_list, and create a new cortex only for a new theme. It names a sibling and the condition triggering it. Missing is the negative case — when to use brain_supersede or brain_link instead of encoding a new entry.

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