Skip to main content
Glama

reflect_memory

Synthesizes stored facts, decisions, beliefs, and heuristics into an ordered, confidence- and recency-ranked reasoning digest for deterministic, local reflection without LLM calls.

Instructions

Synthesizes gathered facts, decisions, beliefs, and heuristics from the Memory Vault into an ordered reasoning digest (Hindsight-style reflection). Entries are grouped by kind (decisions, beliefs, heuristics, lessons, handoffs, context) and ranked by confidence and recency — fully deterministic and local, with no LLM calls.

Args: query: Free-text query steering which memories to reflect on. workspace_dir: Workspace root directory. Empty = engine.default_workspace from the config, else the server's current directory. topic: Optional tag restricting the reflection to a thematic bucket. min_confidence: Minimum certainty threshold in [0.0, 1.0]. Default 0.5. scope: Reflection scope ('local', 'global', or 'all'). Default is 'all'. project: Optional project slug filter.

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

Input Schema

NameRequiredDescriptionDefault
queryYes
scopeNoall
topicNo
projectNo
workspace_dirNo
min_confidenceNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.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 burden, and it does disclose valuable traits: fully deterministic, local execution, no LLM calls, grouping by kind, and ranking by confidence plus recency. It never states that the operation is read-only and non-mutating (relevant given delete_memory/patch_memory_section siblings), nor does it mention cost, latency, or auth requirements.

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?

Purpose and mechanics come first, followed by a conventional Args block, so the important content is front-loaded. Slightly dense opening sentence, but no filler sentences — each clause adds 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?

Output formatting is covered by an existing output schema, so the description rightly focuses on inputs and behavior. All six parameters appear, and determinism/no-LLM behavior is stated. The main omission is the absence of any read-only/mutation statement for a tool with destructive siblings.

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 coverage is 0%, so the description must compensate, and the Args block does document all six parameters with defaults, the [0.0, 1.0] range for min_confidence, the scope values ('local', 'global', 'all'), and the workspace_dir fallback chain. Gaps remain: 'topic' as a 'thematic bucket' and 'project' as a 'slug filter' are named but their accepted formats are undefined. Strong effort, but not fully compensating for the schema gap.

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?

The description states a specific verb and output: it 'synthesizes' gathered facts, decisions, beliefs, and heuristics from the Memory Vault into an ordered reasoning digest. It also specifies the grouping and ranking logic. It never names a sibling (e.g., recall_memory or search_memory) to contrast against, so differentiation is left to inference.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

The usage context is implied by the 'Hindsight-style reflection' framing and by query 'steering which memories to reflect on' — this is a synthesis layer above raw retrieval. However, there is no explicit when-to-use statement, no when-not-to-use, and no reference to the retrieval siblings an agent would otherwise pick.

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