Skip to main content
Glama

lesson_save

Persist a lesson with an initial confidence score for cross-session memory. Recall existing lessons first to avoid duplicates.

Instructions

Persist a new lesson learned during this session with an initial confidence score (default 0.7). Confidence decays over time when the lesson is not reinforced. Does not deduplicate — call lesson_recall first to check whether a similar lesson already exists. Use to record patterns, heuristics, or observations the AI should carry forward across sessions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagsNoOptional tags for categorization. Accepts an array of tag strings (preferred) or a single comma-separated string (legacy).
authorNoOptional author name for team attribution. Defaults to the system username.
contentYesThe lesson text to store.
contextYesWhere this lesson applies, e.g. 'code review' or 'git workflow'.
initial_confidenceNoStarting confidence score between 0 and 1. Defaults to 0.7.
Behavior5/5

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

No annotations provided, so description carries full burden. Describes key behaviors: confidence decay over time, no deduplication, cross-session persistence. No contradictions with annotations (none provided).

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, each essential. First sentence states purpose, second explains behavior, third gives usage context. No redundant or filler content.

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 tool with 5 parameters and no output schema, the description covers purpose, usage, behavior, and context (session, cross-session). No missing elements are critical for agent invocation.

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 baseline is 3. Description adds value by stating default confidence (0.7) and explaining the purpose of confidence decay. However, it does not add significantly to parameter descriptions that are already clear in schema.

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?

Clearly states the tool persists a new lesson with an initial confidence score, using specific verb 'persist' and resource 'lesson'. Distinguishes from sibling tools by mentioning deduplication and referencing lesson_recall.

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?

Explicitly tells when to use (record patterns, heuristics, observations) and when not to (call lesson_recall first if deduplication needed). Provides clear guidance on prerequisites and alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Fmarzochi/EGC'

If you have feedback or need assistance with the MCP directory API, please join our Discord server