Skip to main content
Glama

lesson_save

Store a lesson with a confidence score that decays over time. Use to record patterns or heuristics for AI to recall across sessions.

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?

Since no annotations are provided, the description fully discloses behavioral traits: confidence decays when not reinforced, no deduplication, default confidence of 0.7, and persistence across sessions. This is comprehensive and adds value beyond the schema.

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?

The description is concise, with each of the three sentences adding unique value: main action, behavioral note, and usage motivation. No unnecessary words, front-loaded with the core purpose.

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?

Given 5 parameters (all fully described in schema), no output schema, and moderate complexity, the description covers key behavioral aspects (decay, no dedup, cross-session persistence). It is complete enough for an agent to use correctly, though return value details are omitted.

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. The description adds semantic value by explaining initial_confidence's default and decay behavior, context's meaning ('where this applies'), and tags' legacy support for comma-separated strings. This exceeds the schema descriptions.

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?

The description clearly states the tool persists a new lesson with an initial confidence score, differentiating it from lesson_recall by explicitly noting that it does not deduplicate. The verb 'persist' and resource 'lesson' are specific, and the description distinguishes from siblings by advising to check for duplicates first.

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 explicitly says when to use the tool ('to record patterns, heuristics, or observations') and when not ('does not deduplicate — call lesson_recall first'). It also provides context about confidence decay over time, giving clear usage boundaries.

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