Skip to main content
Glama

Memoria — Deterministic AI Memory & Code Intelligence MCP

Recall Memories

recall_memories
Read-onlyIdempotent

Retrieve up to 20 deterministically ranked memory records for a query (read-only, idempotent; consumes 1 Read API call) and return { results, total_candidates } with per-item { memory, score }. Scores up to 500 candidates in namespace by lexical match (0.55), salience (0.30), and 30-day freshness (0.15) multiplied by tier boost (core=1.5x, semantic=1.25x), excluding items below min_salience. Use when you need individual memory IDs, metadata, or scores (for inspection, feedback, or forget_memory); use build_context instead for a ready-to-inject <memory_context> block, or search_code for code symbols.

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

Input Schema

NameRequiredDescriptionDefault
queryYesKeywords or natural-language topic to match against stored memory content.
namespaceYesLogical workspace namespace to search (defaults to "default"; never prefix with "org:").
min_salienceNoMinimum salience filter (0.0-1.0); memories strictly below this value are excluded.
token_budgetNoAdvisory token budget hint for downstream context sizing (default 4096).

Output Schema

NameRequiredDescriptionDefault
resultsYesRanked { memory, score } matches (max 20).
total_candidatesYesTotal candidate memories evaluated in the namespace.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • addedInput schema / properties / min_salience / default
      Added value: +0
    • changedInput schema / properties / min_salience / description
      Previous value: -"Optional minimum salience threshold."New value: +"Minimum salience filter (0.0-1.0); memories strictly below this value are excluded."
    • changedInput schema / properties / namespace / description
      Previous value: -"Workspace namespace to query."New value: +"Logical workspace namespace to search (defaults to \"default\"; never prefix with \"org:\")."
    • changedInput schema / properties / query / description
      Previous value: -"Search query describing the facts, rules, or decisions needed."New value: +"Keywords or natural-language topic to match against stored memory content."
    • addedInput schema / properties / token_budget / default
      Added value: +4096
    • changedInput schema / properties / token_budget / description
      Previous value: -"Maximum token budget for returned memories (default 4096)."New value: +"Advisory token budget hint for downstream context sizing (default 4096)."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "results": {
      +      "description": "Ranked { memory, score } matches (max 20).",
      +      "items": {
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "total_candidates": {
      +      "description": "Total candidate memories evaluated in the namespace.",
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "results",
      +    "total_candidates"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare read-only and idempotent behavior, but the description adds API-call cost, a 500-candidate scoring cap, scoring weights, tier boosts, a 30-day freshness factor, min_salience exclusion, and result shape. That is substantial behavioral context beyond structured fields.

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?

The definition is front-loaded with the core retrieval action and then supplies only decision-relevant detail: return shape, ranking rules, and alternatives. Despite dense scoring details, every clause supports selection or predictable behavior.

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?

For a scored memory-recall tool with four parameters and an output schema, the description supplies the ranking model, limits, exclusions, and sibling routing needed to invoke it correctly. Return values are also summarized, so nothing essential is missing.

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 parameters are already documented, but the description still adds that ranking considers up to 500 candidates in the namespace, that min_salience excludes below-threshold items, and that query matching is lexical. It does not explain token_budget, but the schema covers that parameter adequately.

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 'Retrieve up to 20 deterministically ranked memory records for a query,' naming the verb, resource, and scope. It also distinguishes the tool from build_context and search_code, so an agent can identify its role without inspecting sibling schemas.

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?

It explicitly says to use this when individual memory IDs, metadata, or scores are needed for inspection, feedback, or forget_memory, and names build_context for ready-to-inject context and search_code for code symbols. This gives clear selection criteria and alternatives.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.