Skip to main content
Glama

brain_context

Read-onlyIdempotent

Retrieve relevant past conversations and saved memories as a bounded context packet to ground replies when a request depends on earlier facts, preferences, decisions, or recent work.

Instructions

Answer from the user's past: one bounded text packet to read before replying.

    The default memory call: use it whenever a request may depend on earlier conversations,
    facts, preferences, decisions or work. It returns `context`, a size-capped text of the
    relevant memories and conversation turns, each with its date and source. For structured
    rows, ids or one thing's history use brain_recall instead.

    Set `recent=true` whenever the question is about what happened lately or what the user was
    just doing: "what was I working on?", "where did we leave off?", "what did I do
    yesterday?", "최근에", "아까", "어제", "지금 뭐 하고 있었지?". Results then come newest
    first instead of by word overlap; naming something ("what did Kongi do lately") keeps them
    about that. Set `since` (ISO date or time) to drop anything earlier, e.g. "this week".
    Set `about_assistant=true` when the user asks what YOU said earlier: "which restaurant did
    you recommend?", "what were the steps you gave me?", "네가 아까 뭐라고 했지?". Your own
    past answers are then searched by meaning too, not only by their words.
    Set `around` when the question is about WHEN WE TALKED: "what did we discuss last week?",
    "지난달에 얘기한 거" -> resolve it yourself to a date or "start..end" (e.g. "2026-09-23"
    or "2026-09-01..2026-09-30"). Conversations from then rank first; nothing is dropped.
    Do not set it for when something HAPPENED ("the event I went to two weeks ago"): people
    mention events days or weeks before or after, so that date misleads (measured: on dev2
    it pushed the answering turn out in 2 of 11 questions and helped 2).

    Each conversation item is one excerpt of one turn. Never tell the user you don't know
    without first opening the item most likely to hold the answer:
    brain_recall(source=<the text after "Source: <app> / ">) returns that turn in full with
    the turns around it (your reply to that request, the rest of a list, the line before).
    Open it too when an item you rely on is cut off.
    

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": {
      "query": "<query>"
    },
    "name": "brain_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
as_ofNoISO time: only what had happened by then (default now).
limitNoMost items to return.
queryYesThe user's request, in their words.
sinceNo
aroundNo
policyNoauto skips requests with no sign of the past.always
recentNo
scopesNoOnly these scopes, e.g. ["global"] or a project; default all.
max_charsNoSize cap of the returned text.
about_assistantNo
knowledge_cutoffNoISO time: only what had been saved by then (default as_of).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.10.4
    • changedInput schema / properties / limit / default
      Previous value: -30New value: +60
    • changedInput schema / properties / max_chars / default
      Previous value: -15000New value: +30000
  2. Changed7 schema fields changedv0.9.5
    • addedInput schema / properties / as_of / description
      Added value: +"ISO time: only what had happened by then (default now)."
    • addedInput schema / properties / knowledge_cutoff / description
      Added value: +"ISO time: only what had been saved by then (default as_of)."
    • addedInput schema / properties / limit / description
      Added value: +"Most items to return."
    • addedInput schema / properties / max_chars / description
      Added value: +"Size cap of the returned text."
    • addedInput schema / properties / policy / description
      Added value: +"auto skips requests with no sign of the past."
    • addedInput schema / properties / query / description
      Added value: +"The user's request, in their words."
    • addedInput schema / properties / scopes / description
      Added value: +"Only these scopes, e.g. [\"global\"] or a project; default all."
  3. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), yet the description still adds substantial unseen behavior: output is size-capped, results are ordered by word overlap by default but newest-first under `recent`, `around` re-ranks without dropping anything, and each conversation item is 'one excerpt of one turn' that may be cut off. It even quantifies the risk of misusing `around` with a measured result, which no annotation conveys.

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 critical framing (what it returns, default status, sibling routing) is front-loaded in the first paragraph, with per-flag guidance after. It is longer than necessary for a select-and-call decision, though, and the parenthetical dev-set measurement ('2 of 11 questions') is justification prose rather than instruction.

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?

Eleven parameters, a required query, an output schema, and annotation coverage are all accounted for. The description supplies exactly the pieces structured fields cannot: when to invoke, how the flags change ranking, and the follow-up workflow ('brain_recall(source=<the text after "Source: <app> / ">')') for opening a truncated item before telling the user it doesn't know.

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?

Three of the parameters most likely to be misused (`recent`, `about_assistant`, `around`) carry no schema description at all, and the description compensates fully with concrete trigger phrases and expected ranking changes. `around` additionally specifies the accepted date syntax ('2026-09-23' or 'start..end') that the schema leaves as an untyped string, and `since` gets a worked example ('this week').

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?

Opens with a specific verb-and-resource statement: it returns 'one bounded text packet' of past memory to read before replying, and names the return field (`context`). It explicitly contrasts itself with the closest sibling, brain_recall, for 'structured rows, ids or one thing's history', so an agent can choose between them without reading either 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?

Declares itself 'the default memory call' and gives the triggering condition ('whenever a request may depend on earlier conversations, facts, preferences, decisions or work'). It then gives explicit when-to-set rules for each behavioral flag with example phrasings in two languages, and a negative case for `around` with a stated rationale ('Do not set it for when something HAPPENED').

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