Skip to main content
Glama
total-agent-memory

total-agent-memory

memory_recall

Read-onlyIdempotent

Search all past-session memories—decisions, solutions, facts, and lessons—before starting a task to retrieve relevant context.

Instructions

Search ALL memory: decisions, solutions, facts, lessons from ALL past sessions. 6-stage pipeline: FTS5+BM25 → semantic → fuzzy → graph → (optional) CrossEncoder → (optional) MMR. Default: hybrid mode (BM25 + semantic + RRF). Use BEFORE starting any task. v11.0: routes to fast hot path when MEMORY_MODE=fast (default). Use memory_search_fast / memory_explain_search for explicit fast routing.

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": "memory_recall"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoProgressive-disclosure mode: 'search' (default) = normal results, 'index' = ultra-compact metadata only (id+title+score+type+project+created_at, ~40-60 tok/hit, no cognitive expansion, use memory_get(ids=...) to fetch full content), 'timeline' = chronological compact view; 'context' = source excerpts; 'evidence' = indexed passage search with bounded follow-up retrievalsearch
typeNoall
as_ofNoISO date or datetime selecting records active at that instant before search; also anchors relative dates in the query. Omit for current active records. See docs/SNAPSHOT_RETRIEVAL.md for replacement, deletion and metadata semantics.
limitNo
queryYesWhat to search for
branchNoFilter by git branch (also includes branch-agnostic records)
detailNoLevel of detail: 'compact' ~50 tokens/result (id+title+score), 'summary' truncates content to 150 chars, 'full' returns everything, 'auto' picks based on query complexity (paths/urls/code → full, short → compact). Ignored when mode!='search'.full
fusionNoScore fusion method: 'rrf' = Reciprocal Rank Fusion (better multi-tier ranking), 'legacy' = original additive scoringrrf
intentNoFilter by classified intent (question|procedural|fact|decision|problem|solution|incident|plan)
rerankNoEnable CrossEncoder re-ranking for higher precision (adds ~30ms latency)
topicsNoFilter results to records tagged with any of these topics (from deep enrichment)
diverseNoEnable MMR diversity to reduce redundant results (useful for broad queries)
projectNoFilter by project name
entitiesNoFilter by extracted entity names (technology/person/project, case-insensitive)
incidentNoFilter incident records by status, exact affected scope and overlapping half-open UTC interval. Uses scoped full-text retrieval.
neighborsNoTimeline/context modes: records before/after each hit; context accepts 0–3.
fill_budgetNoContext mode: search deeper (up to 100 hits) and keep whole hits in rank order until context_max_chars is used, instead of excerpting the top `limit` hits to fit. Neighbours default to 0 here; pass `neighbors` to keep each hit with the records around it.
expand_budgetNoMax number of additional records to include via graph expansion
decisions_onlyNoReturn only structured decisions (v8.0): type=decision AND tags contain 'structured'. Results include parsed schema payload under 'decision'.
expand_contextNoAdd graph-related records (1-hop neighbors via knowledge graph) as 'expansion' results
missing_relationNoEvidence mode: missing relation; subject must occur in the original question.
context_max_charsNoContext character budget; evidence mode uses the same value as a stricter UTF-8 byte budget.
evidence_followupNoEvidence mode: allow one search for an explicitly supplied missing_relation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv15.0.0
    • changedInput schema / properties / as_of / description
      Previous value: -"ISO date or datetime that relative dates in the query ('last month', 'three weeks ago', 'yesterday') are counted from. Default: now."New value: +"ISO date or datetime selecting records active at that instant before search; also anchors relative dates in the query. Omit for current active records. See docs/SNAPSHOT_RETRIEVAL.md for replacement, deletion and metadata semantics."
    • addedInput schema / properties / incident
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Filter incident records by status, exact affected scope and overlapping half-open UTC interval. Uses scoped full-text retrieval.",
      +  "properties": {
      +    "from": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "From"
      +    },
      +    "scope": {
      +      "anyOf": [
      +        {
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Scope"
      +    },
      +    "status": {
      +      "anyOf": [
      +        {
      +          "enum": [
      +            "open",
      +            "closed"
      +          ],
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Status"
      +    },
      +    "to": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "To"
      +    }
      +  },
      +  "title": "IncidentFilter",
      +  "type": "object"
      +}
    • changedInput schema / properties / type / enum
      Previous value: -[
      -  "decision",
      -  "fact",
      -  "solution",
      -  "lesson",
      -  "convention",
      -  "all"
      -]New value: +[
      +  "decision",
      +  "fact",
      +  "solution",
      +  "lesson",
      +  "convention",
      +  "incident",
      +  "all"
      +]
  2. Changed1 schema field changedv14.9.0
    • addedInput schema / properties / as_of
      Added value: +{
      +  "description": "ISO date or datetime that relative dates in the query ('last month', 'three weeks ago', 'yesterday') are counted from. Default: now.",
      +  "type": "string"
      +}
  3. Changed1 schema field changedv14.7.0
    • addedInput schema / properties / fill_budget
      Added value: +{
      +  "default": false,
      +  "description": "Context mode: search deeper (up to 100 hits) and keep whole hits in rank order until context_max_chars is used, instead of excerpting the top `limit` hits to fit. Neighbours default to 0 here; pass `neighbors` to keep each hit with the records around it.",
      +  "type": "boolean"
      +}
  4. Changed6 schema fields changedv14.0.0
    • addedInput schema / properties / context_max_chars
      Added value: +{
      +  "default": 24000,
      +  "description": "Context character budget; evidence mode uses the same value as a stricter UTF-8 byte budget.",
      +  "minimum": 512,
      +  "type": "integer"
      +}
    • addedInput schema / properties / evidence_followup
      Added value: +{
      +  "default": true,
      +  "description": "Evidence mode: allow one search for an explicitly supplied missing_relation.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / missing_relation
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Evidence mode: missing relation; subject must occur in the original question.",
      +  "properties": {
      +    "relation": {
      +      "type": "string"
      +    },
      +    "subject": {
      +      "type": "string"
      +    },
      +    "time": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "subject",
      +    "relation"
      +  ],
      +  "type": "object"
      +}
    • changedInput schema / properties / mode / description
      Previous value: -"Progressive-disclosure mode: 'search' (default) = normal results, 'index' = ultra-compact metadata only (id+title+score+type+project+created_at, ~40-60 tok/hit, no cognitive expansion, use memory_get(ids=...) to fetch full content), 'timeline' = top-K hits expanded with ±neighbors from same session (chronological)"New value: +"Progressive-disclosure mode: 'search' (default) = normal results, 'index' = ultra-compact metadata only (id+title+score+type+project+created_at, ~40-60 tok/hit, no cognitive expansion, use memory_get(ids=...) to fetch full content), 'timeline' = chronological compact view; 'context' = source excerpts; 'evidence' = indexed passage search with bounded follow-up retrieval"
    • changedInput schema / properties / mode / enum
      Previous value: -[
      -  "search",
      -  "index",
      -  "timeline"
      -]New value: +[
      +  "search",
      +  "index",
      +  "timeline",
      +  "context",
      +  "evidence"
      +]
    • changedInput schema / properties / neighbors / description
      Previous value: -"Timeline mode only: how many records before/after each hit to include."New value: +"Timeline/context modes: records before/after each hit; context accepts 0–3."
  5. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered. The description adds real behavioral context beyond that: the retrieval pipeline stages, the default hybrid mode (BM25 + semantic + RRF), and the automatic hot-path routing when MEMORY_MODE=fast. It does not discuss cost/latency for the optional CrossEncoder/MMR stages beyond the schema's own notes.

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

Conciseness3/5

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

Purpose and usage are front-loaded, which is good, but the sentence enumerating the 6-stage pipeline (FTS5+BM25 → semantic → fuzzy → graph → CrossEncoder → MMR) and the 'v11.0' version tag consume space without changing how an agent invokes the tool. Not wasteful enough to be a problem, but not tight either.

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 23-parameter tool with no output schema, the description covers intended purpose, default mode, routing behavior, and how to escalate from compact metadata to full content via memory_get. Return-shape detail is partially implied rather than stated, but the schema carries the parameter burden well.

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 91%, so the schema already explains nearly all 23 parameters including mode, detail, as_of and the incident/evidence sub-objects. The description only reinforces the default fusion mode and fast-path behavior, adding little meaning the schema does not already carry. Baseline 3 is appropriate.

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 opens with a specific verb and scope: 'Search ALL memory: decisions, solutions, facts, lessons from ALL past sessions', and it names the sibling to use for fetching full content (memory_get) and for explicit fast routing (memory_search_fast / memory_explain_search). An agent can distinguish this from the other recall/eval 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Use BEFORE starting any task' gives a clear usage cue, and it names specific alternatives for fast routing. It lacks explicit when-not-to-use guidance (e.g., when to prefer memory_answer or memory_recall_iterative), so it stops short of full alternative routing.

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