Skip to main content
Glama
M-T-D-N

agentmemory-codex-windows

memory_lesson_save

Saves a reusable lesson to an exact project with context and confidence, strengthening matching lessons or creating new ones from official observation sources.

Instructions

Persist a reusable lesson in an exact project with context, confidence and optional official observation provenance. sources pairs are preferred; sourceIds supplies comma-separated observation IDs, all validated in that project. Matching normalized content strengthens the existing lesson and merges support/tags; otherwise creates one. Returns {success,action,lesson}, with action created or strengthened. Use memory_save for decisions/preferences, and memory_lesson_recall before applying earlier lessons.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagsNoComma-separated tags
contentYesThe lesson learned (what worked, what to avoid, when to use X approach)
contextNoWhen/where this lesson applies
projectYesProject this lesson is about
sourcesNoPreferred exact provenance pairs from official sessions in this project
sourceIdsNoComma-separated official observation IDs from this exact project that support the lesson
confidenceNoInitial confidence 0.0-1.0 (default 0.5)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0-preview.14-glama.1

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it discloses upsert semantics ('matching normalized content strengthens the existing lesson and merges support/tags; otherwise creates one'), validation scope, and the return shape with action values. It stops short of permissions, rate limits, or failure modes, which keeps it from a 5.

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?

Front-loaded with purpose and scope, then provenance, then behavior, then sibling routing. Dense but every sentence earns its place; slightly packed but not wasteful.

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 7-parameter mutation tool with no annotations and no output schema, the description covers behavior, return shape, and sibling routing adequately. Only auth/permission expectations are unaddressed.

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 the schema already documents all seven parameters (baseline 3). The description adds genuine meaning beyond the schema by stating that 'sources pairs are preferred' over sourceIds and that both are 'validated in that project', clarifying the precedence between the two provenance inputs.

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?

States a specific verb and resource ('Persist a reusable lesson') plus scope ('in an exact project'), and explicitly names siblings it is not (memory_save, memory_lesson_recall). An agent can distinguish it from the other lesson/memory tools 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?

Provides explicit routing: 'Use memory_save for decisions/preferences, and memory_lesson_recall before applying earlier lessons.' This gives both the alternative tool and the condition that selects it, leaving nothing to inference.

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