Skip to main content
Glama
3lehr
by 3lehr

lesson_record

Record mistakes, insights, patterns, or antipatterns for later retrieval; use same_as to mark repeats and count occurrences, and set near_miss to capture corrected errors before damage occurs.

Instructions

Record a lesson learned. Pass same_as= when this is a repeat of an already-recorded lesson: increments that lesson's occurrences, appends this description to it as a dated, capped repetition note, and creates no new row (unknown same_as id is an error, never a silent new entry). Escalates to rule at 3+ occurrences. Without same_as: increments occurrences only on an exact duplicate (same type + byte-identical description); otherwise creates a new lesson and, if an active lesson of the same type looks similar, returns it as similar_lesson_hint (a hint only — never auto-merged; re-record with same_as to merge). anlass records what triggered this entry: 'selbst' (you wrote it unprompted) or 'betreiber' (an explicit human instruction, e.g. "merk dir das") are SELF-REPORTED -- only as reliable as the caller. 'hook' and 'skript' are objective in principle, but note the enforcing Stop-hook never calls this tool itself -- it only forces you to run /learn, which then calls this normally, so 'hook' is still self-reported by that skill, not verified by the server. Default 'unbekannt' if omitted; an unknown value is rejected with the allowed list, nothing is written (applies even on a duplicate/same_as bump, where the existing row's anlass is left untouched anyway). SET beinahefehler=true FOR A NEAR MISS: something you caught and corrected BEFORE it did damage -- a wrong number you almost reported as evidence, a command you almost ran on the wrong file, a claim you almost made without checking. Record it in the same flow, do not wait for the end of the session: this class is the cheapest to learn from and the one that goes unrecorded, because a correction in the same breath feels like a work step, not a mistake. It is counted, not judged -- what gets counted is the error class and what caught it, never who made it. bemerkt_woran is then MANDATORY (what caught it); without it nothing is written.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYes
actorNoCalling agent identity; else BEGOD_KNOWLEDGE_ACTOR or unknown
kreisNoOptional: restrict this lesson to one circle of people you belong to (BDW-E22). Empty (default) means everyone in your tenant. Set it AT CREATION.
modelNoCalling model; else BEGOD_KNOWLEDGE_MODEL or unknown
same_asNoID of an existing lesson this is a repeat of, e.g. 'L-6e48a9'
sessionNoStable session ID; else BEGOD_KNOWLEDGE_SESSION or unknown
occasionNoWhat triggered this entry -- selbst/betreiber self-reported, hook/skript objective in principle (see tool description). Default 'unbekannt'.unbekannt
projectsNoAffected projects
severityNomedium
caught_byNoWhat caught the near miss -- zahl (a number/output did not match expectation, no mechanism involved), test, waechter (hook/trigger/lint), gegenprobe (deliberate counter-check), wissen (a recalled lesson/node), betreiber (a human said so), zufall (noticed by chance while reading something else). Mandatory when beinahefehler=true.
near_missNoNear miss: caught and corrected before any damage. Requires bemerkt_woran.
node_pathNoRelated knowledge node path
preventionNo
resolutionNo
root_causeNo
descriptionYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does so exceptionally well. It discloses that an unknown same_as ID 'is an error, never a silent new entry,' that similar_lesson_hint is 'a hint only — never auto-merged,' and that an unknown anlass value is 'rejected with the allowed list, nothing is written.' It also reveals subtle side effects such as occurrence increments, escalation to rule at 3+, and that the Stop-hook never directly calls this tool, making 'hook' only self-reported. This level of disclosure goes far beyond what structured fields could provide.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single dense block of text with long run-on sentences and no section breaks or bullet points. Every sentence does carry substantive edge-case information, so there is little filler, but the lack of structure makes it harder to parse quickly. The all-caps instruction 'SET beinahefehler=true' is attention-grabbing yet clutters the flow, and the text is arguably longer than necessary for the complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 16-parameter tool with no annotations and no output schema, the description covers the core workflow, duplicate handling, near-miss semantics, and many error conditions. However, it does not describe the return value or output shape (e.g., what a successful response contains, how similar_lesson_hint is structured, or what the 'rule' escalation returns). The parameter-name mismatch also leaves the near-miss/caught_by flow ambiguous. The description is substantial but not fully complete for an agent to confidently invoke the tool in all cases.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds meaningful semantics for same_as, occasion (anlass), near_miss (beinahefehler), and caught_by (bemerkt_woran), including the byte-identical duplicate rule and the mandatory nature of caught_by for near misses. However, it systematically uses parameter names that do not exist in the input schema: 'anlass' vs. 'occasion', 'beinahefehler' vs. 'near_miss', and 'bemerkt_woran' vs. 'caught_by'. This mismatch can lead an agent to construct invocations with invalid keys, which is a serious flaw that significantly undermines the semantic value of the description.

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 opens with 'Record a lesson learned,' a precise verb+resource statement that clearly identifies the tool's function. The subsequent details about same_as handling, duplicate detection, and near-miss recording make it unmistakably distinct from sibling tools like lesson_update or knowledge_add. Even though sibling tools are not named, the operational specifics fully differentiate this tool's purpose.

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 description gives explicit conditions for when to pass same_as ('when this is a repeat of an already-recorded lesson') and for near misses ('Record it in the same flow, do not wait for the end of the session'). It also explains when same_as should not be used and how merging should be done. However, it does not explicitly compare against alternative tools like lesson_update or lesson_query, so the guidance is context-rich but lacks sibling exclusions.

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

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/3lehr/brainlehr'

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