Skip to main content
Glama

save_lesson_draft

Validates and saves a lesson draft to the course's lessons folder, requiring sections: Learning objectives, Prerequisites, Content, Summary, Exercises, Further reading.

Instructions

Step 5 of the course build — save one drafted lesson to disk.

Writes a single lesson's markdown into the course's lessons folder; call it
once per lesson during drafting. The content is validated and rejected
unless it contains all required sections, in order:
## Learning objectives, ## Prerequisites, ## Content (with ### Section N:
subsections), ## Summary, ## Exercises, ## Further reading. The filename is
derived from the lesson number and its title in lessons.json.

Args:
    slug: The course slug; selects the
        knowledge/courses/<slug>/lessons/ folder to write into.
    lesson_id: The lesson id, which must match an id in lessons.json
        (e.g. "lesson-01"); used to look up the title and build the filename.
    content: The full markdown body of the lesson, including all required
        sections listed above.

Returns:
    A confirmation with the written file path, or a rejection message
    listing the required sections that are missing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugYes
lesson_idYes
contentYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

No annotations are provided, so the description carries the full burden. It thoroughly discloses content validation requirements (six required sections in order), filename derivation from lessons.json, and return values (file path or rejection with missing sections). This gives the agent a clear behavioral model.

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?

The description is well-structured with a front-loaded purpose, followed by validation details and parameter descriptions. It is comprehensive but could be slightly tighter by removing redundant phrasing. The use of bullet-like list for required sections aids readability.

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 the complexity (3 parameters, validation rules, output schema), the description covers key aspects: purpose, validation, return, and filename derivation. It does not mention prerequisites like lessons.json existence or course initialization, but the 'Step 5' context implies these. Overall adequate.

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 0%, so the description must compensate. It explains that slug selects the folder path, lesson_id must match an id in lessons.json (with example), and content is the full markdown body. This adds meaningful context beyond the schema names, though more detail on slug format would be beneficial.

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 it saves one drafted lesson markdown to disk as Step 5 of the course build. It specifies the action (save), resource (lesson draft), and scope (single lesson per call), distinguishing it from sibling tools like save_course_curriculum or save_course_outline.

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 advises calling it once per lesson during drafting and within the course build sequence (Step 5). It provides clear context but does not explicitly state when not to use it or list alternatives, which would strengthen the guidance.

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/SVerITG/Metis_PH'

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