Skip to main content
Glama
persistent-memory-mcp

persistent-memory-mcp

Learn a lesson

memory_learn

Store the lesson from a completed task together with its trace and feedback, so future searches return only the lesson and withdrawing supporting evidence stops it being served.

Instructions

After a task, store the lesson drawn from it, with the task trace and the feedback it got kept as its provenance. Only the lesson is returned by searches; withdrawing the trace or the feedback stops serving the lesson. For a fact the user states, use memory_remember.

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": {
      "trace": "<trace>",
      "feedback": "<feedback>",
      "lesson": "<lesson>"
    },
    "name": "memory_learn"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNoobservation for a fact, document for a text, procedure for how to do something, task, feedback, or hypothesis for a guess nobody confirmed.
traceYesWhat was done: steps, commands or a summary of them.
lessonYesThe rule to apply next time, self-contained.
aliasesNoShort names to find it again.
feedbackYesWhat the user or a check said about the result.
lesson_idNoStable name you choose. Leave out to get one.
confidenceNoDeclared, not computed. Leave out unless the user gave one.
valid_fromNoUTC time it starts to apply, e.g. 2026-01-31T00:00:00Z. Leave out unless the user gave one; by default it applies now.
valid_untilNoUTC time after which it no longer applies. Leave out unless the user gave one.
preconditionsNoExact conditions a search must supply to see it. Leave out unless the user said it only holds under a condition: a search without these conditions will not return it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations only declare the write profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false). The description goes well beyond that by explaining the provenance model: trace and feedback are retained as provenance but only the lesson surfaces in searches, and removing the provenance suppresses the lesson. It stops short of addressing duplicate lesson_id behavior or whether a repeated call creates a second entry, which matters given idempotentHint=false.

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?

Three sentences, front-loaded with the core action, then the behavioral consequence, then the sibling routing. Every clause carries distinct information and nothing is repeated from the schema.

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 10-parameter write tool with nested objects and no output schema, the description covers the essential unknowns: where the data goes, what is retrievable, and when the record disappears from search. The remaining gap is that it never states what the call returns or how a repeated lesson_id is handled, which is relevant since searches only ever surface the lesson.

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 description coverage is 100%, so the baseline would be 3. The description earns more by explaining the semantic relationship between parameters that the schema lists only individually: trace and feedback are provenance, the lesson is the retrievable artifact, and preconditions is gate-keeping for search visibility. It adds no syntax or format guidance for trace/feedback beyond the schema, so 5 is not warranted.

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?

"After a task, store the lesson drawn from it" gives a specific verb (store), resource (lesson), and timing (post-task), and the closing sentence explicitly separates this from memory_remember. An agent can distinguish this from memory_derive or memory_remember without opening any 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?

The description supplies both the trigger condition ("after a task") and an explicit alternative with its own condition ("For a fact the user states, use memory_remember"). It also implies lifecycle guidance by noting that withdrawing the trace or feedback stops serving the lesson.

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