Skip to main content
Glama

Save lesson

save_lesson

Records a lesson learned from a user correction by capturing the situation, mistake, and correct approach. Call immediately after the user corrects your work so the AI can remember and adapt.

Instructions

Record a lesson learned from a correction: what situation, what mistake, what is the correct way. Call immediately after the user corrects your work.

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": {
      "situation": "<situation>",
      "mistake": "<mistake>",
      "correction": "<correction>"
    },
    "name": "save_lesson"
  }
}

Input Schema

NameRequiredDescriptionDefault
mistakeYesWhat was done wrong
situationYesThe original situation/context
correctionYesThe correct approach

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.4.2
    • removedInput schema / additionalProperties
      Removed value: -false
  2. First observedv2.2.1

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it makes clear this is a write operation whose content is a correction-derived lesson, which is useful behavioral context. However, it says nothing about persistence, duplicate/repeat saves, whether lessons are later surfaced by recall, or any permission requirements. That is a moderate gap for an unannotated mutation tool.

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?

Two short sentences with zero filler: the content specification comes first and the timing instruction second. Every clause earns its place and nothing is buried.

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 simple three-param, no-output-schema tool, the description covers both what to record and when to record it, which is enough to invoke it correctly. It leaves open what happens to saved lessons afterward (how they are retrieved or whether saves can be updated), a minor omission given the tool's simplicity.

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 coverage is 100% and each of the three properties has its own description. The prose ('what situation, what mistake, what is the correct way') restates the parameters without adding format or length guidance beyond the schema's min/max constraints. Baseline 3 is appropriate.

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 gives a specific verb ('Record') and resource ('a lesson learned from a correction') and enumerates the three content components, so the agent knows exactly what gets stored. It does not name or differentiate itself from siblings like remember or update_memory, so it falls short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The trigger is explicit and actionable: 'Call immediately after the user corrects your work.' That tells the agent the exact moment to use it. It offers no exclusions or comparison to alternatives such as remember or update_memory, which keeps it out of 5 territory.

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