Skip to main content
Glama

save_lesson

Saves a roadmap concept lesson as Markdown with up to five runnable examples so learners can read and run code before activities.

Instructions

Save a lesson for one roadmap concept: Markdown (at most 64 KB) the learner reads before the activity, and up to 5 runnable examples. Each example is a file map with exactly the track's learner files (for unit, plus tests/ files); Codemm runs each in the sandbox with no input and it must exit 0. Place example N in the Markdown as a fenced block with info string example whose only line is N. An example that needs input goes in a plain code block. Diagrams and charts go in fenced blocks with info string mermaid (flowchart, sequenceDiagram, stateDiagram-v2, classDiagram, pie, xychart), only when a picture teaches better than words; give each an accTitle and accDescr for screen readers. The id must be new in the course.

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": {
      "id": "<id>",
      "concept": "<concept>",
      "title": "<title>",
      "markdown": "<markdown>"
    },
    "name": "save_lesson"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesLesson id
titleYes
conceptYesConcept id from the roadmap
examplesNoRunnable examples; they need the track set up
markdownYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full load and does well: it discloses the 64 KB Markdown cap, the 5-example cap, that Codemm executes each example in the sandbox with no input and requires exit 0, and that the id must be new in the course (a create-only uniqueness constraint). It stops short of saying what happens on validation failure or whether the tool returns anything, but the behavioral picture is substantially richer than 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.

Conciseness4/5

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

It is front-loaded with the purpose before the formatting rules, and nearly every sentence encodes a real constraint (fenced block info strings, mermaid accTitle/accDescr, plain code block for input-requiring examples). The parenthetical enumeration of diagram types and the back-reference to sandbox behavior are slightly verbose but still functional.

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 5-parameter authoring tool with no annotations and no output schema, the description covers content shape, execution requirements, and uniqueness constraints. Missing pieces are failure behavior and the return value, but the authoring contract an agent needs to construct a valid call is essentially complete.

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 60%, and the description fills the important gaps: it constrains 'markdown' with a size limit and formatting rules, constrains 'examples' to at most 5 file maps containing exactly the track's learner files plus tests/ for unit tracks, and constrains 'id' to be new in the course. Only 'title' remains unexplained, which is a minor omission.

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 opening sentence gives a specific verb and resource ('Save a lesson') scoped to 'one roadmap concept', and the following clauses describe exactly what a lesson consists of (Markdown plus up to 5 runnable examples). It does not explicitly differentiate itself from siblings like save_exercise or save_track, so an agent must infer the boundary from the resource noun alone.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: the tool is for authoring lesson content attached to a roadmap concept, and one conditional rule is given ('only when a picture teaches better than words'). There is no explicit when-to-use vs. when-to-use-save_exercise guidance, no prerequisite ordering (does the track/roadmap need to exist first?), and no stated alternative for exercises or diagrams that don't fit.

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