Skip to main content
Glama

ddflow_memory

Store lessons and decisions, search or recall past context, and link related records so agents reuse prior knowledge instead of repeating mistakes.

Instructions

Lessons, memories, recall and record links. Set action; required arguments in brackets: lesson_verify, lesson_add(title), lesson_search(query), recall(query), similar(text), dupes, link(subject,relation,target), add(text), list, forget(id,reason).

Input Schema

NameRequiredDescriptionDefault
idNoStable id you choose. Referenced by `supersedes`, by commit messages and by the reconstruction; a generated id cannot be cited in advance.
allNoInclude forgotten memories, with why they were forgotten.
howNoHow to apply or detect it.
whyNoWhy it is true / what went wrong.
itemNoOnly the pairs this record is in.
kindNoComma-separated subset of the configured kinds to look in: bug,task,phase,lesson,decision,research,memory. Default: all of them.
ruleNoThe rule in full.
tagsNoComma-separated tags, e.g. 'gpu,machine'.
textNoThe title or summary of the record you are about to file.
floorNoMinimum score to report (default: [dedupe].show_floor).
globsNoComma-separated globs to scan for `pattern`. Default: every tracked file.
limitNoAt most this many (default: all).
queryNoRank by relevance to this instead of by recency.
titleNoThe rule as a one-line statement.
actionYesWhat to do; see the tool description for each action's arguments.
reasonNoWhy, recorded with the link.
targetNoThe record it is related to.
patternNoA regex naming the mistake in CODE. Scans now and stores WHICH sites match, so `ddflow_lesson_verify` can name those that reappear. Prefer it to a remembered rule when mechanical: a count says 'worse', never 'which'. Refused if it does not compile.
seen_inNoComma-separated item ids where this was hit. What makes a lesson checkable later instead of merely memorable.
sourcesNoComma-separated subset: decisions,lessons,memories,research,bugs,items,prompts. Default: all.
subjectNoThe record being related (the duplicate, for a merge).
summaryNoThe lesson in ONE paragraph, for a reader who will not open the full rule. Rendered into docs/ddflow/LESSONS-SUMMARY.md.
as_agentNoSubagent name, this call only.
relationNoAnswer to a 'possible duplicate' refusal: new | extends:ID | duplicate_of:ID | related:ID | merge_into:ID. Omit at first.
max_charsNoTotal budget for the answer. The point of a budget is that recall is called at the START of work, where a long answer costs the context the work itself needs.
open_onlyNoOnly pairs where both records are still live (the dedupe_sweep pass).
check_onlyNoDry run: write nothing, return the `candidates`.
supersedesNoComma-separated lesson ids this replaces. The old one is retired, not deleted: the corpus stops growing without losing what was once believed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.9

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden, yet it says nothing about which actions mutate state, what gets destroyed or retired, persistence, dedupe refusal behavior, or side effects. The only behavioral hints (supersedes retirement, duplicate refusal) appear in schema parameter descriptions, not in the tool description itself.

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 description front-loads the domain then compresses all ten actions into a compact bracketed list with no filler. The telegraphic style is dense but structurally sound; some tokens such as 'dupes' are terse at the cost of readability.

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

Completeness2/5

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

For a 28-parameter, ten-action tool with no annotations and no output schema, the description omits return shapes, mutation/safety profiles, dedupe refusal handling, and workflow placement. The schema covers parameters but the description does not complete the picture an agent needs to invoke actions confidently.

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 100%, and the description adds a useful action-to-argument mapping (lesson_add:title, link:subject/relation/target, forget:id/reason). But that mapping is incomplete and potentially misleading: lesson_add clearly also needs rule/summary/why/how, and add needs more than text, so an agent relying on the brackets alone would under-supply arguments.

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 names the domain (lessons, memories, recall, record links) and enumerates all ten actions with their essential arguments, so an agent can tell this is the multiplexer for lesson/memory operations. It does not explicitly distinguish the tool from siblings such as ddflow_rule or ddflow_bug, which is the main gap.

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 action list implies which action to choose for a given need (e.g., lesson_search(query), recall(query), link(...)) and states bracketed required arguments, which is real invocation guidance. However it never says when to use this tool over ddflow_rule/ddflow_bug, never says when not to, and gives no workflow placement such as calling recall at the start of work.

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