Skip to main content
Glama

lesson_append

Materializes a class-level lesson into Thread Keeper's shared lessons.md, overwriting the same-title section idempotently after duplicate checks, so agents retain reusable guidance.

Instructions

Materialize a class-level lesson into ~/.threadkeeper/lessons.md.

title is sluggified to a stable key — repeated calls with the same title overwrite the existing section (idempotent).

body is markdown; goes verbatim into the section body.

summary is an optional one-liner rendered as a blockquote right after the header. Use when the body is long and a TL;DR helps the next agent decide whether to read further.

source is a provenance tag — typically a thread id ("Tabc123") when written by review_thread, or "shadow" when written by the shadow_review observer. Empty is fine.

Every new lesson passes duplicate gates first. A near-duplicate is refused with the neighbour's slug: extend it with lesson_patch. A foreground author who has read that neighbour and is sure the rule is different may pass its slug as new_despite. A lesson that debunks a near-duplicate must correct that lesson instead.

Input Schema

NameRequiredDescriptionDefault
bodyYes
titleYes
sourceNo
summaryNo
new_despiteNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.21.0
    • addedInput schema / properties / new_despite
      Added value: +{
      +  "default": "",
      +  "title": "New Despite",
      +  "type": "string"
      +}
  2. First observedv0.13.2

TDQS

A4.1/5.0
Behavior1/5

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

The description explicitly labels the overwrite behaviour '(idempotent)', while the annotations declare idempotentHint=false — a direct conflict on the very trait the annotation flags, which will leave an agent unsure whether repeat calls are safe. The remaining content (duplicate gates, provenance tag, refusal semantics) is genuinely valuable, but the definition contradicts its own structured metadata.

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 the one-line purpose, then a compact paragraph per parameter, then the duplicate-gate rules. Nearly every sentence earns its place, though the backtick-heavy formatting and repeated field naming make it slightly longer than strictly necessary.

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 5-parameter mutation tool with an output schema (so return values need no explanation), the description covers destination, key derivation, idempotent overwrite, provenance, and the refusal/override workflow. Nothing an agent needs in order to call it correctly is missing.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must carry all meaning — and it does: title is sluggified into a stable section key, body is verbatim markdown, summary renders as a blockquote TL;DR after the header, source is a provenance tag with concrete values ('Tabc123', 'shadow'), and new_despite is the duplicate-gate escape hatch.

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 plus the destination: 'Materialize a class-level lesson into ~/.threadkeeper/lessons.md.' It is clearly distinguished from sibling lesson_patch (which extends an existing lesson) and from read-side siblings like lesson_get/lesson_list.

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 routes the agent: near-duplicates are refused and should be extended with lesson_patch, and only a foreground author who has read the neighbour may override via new_despite. It also states that a debunking lesson must correct the existing one rather than be appended.

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

Deploy Server

Other Tools