Skip to main content
Glama

save_lesson_draft

Save one lesson draft as markdown, validating required sections, and confirm the file path or report missing sections.

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
Behavior3/5

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

The description discloses key behaviors: writes markdown, validates required sections, derives filename from lesson number and title, and returns confirmation or rejection. However, it does not mention if the tool overwrites existing files, requires the course folder to exist, or whether it is safe to call multiple times. Given no annotations, more detail on side effects would improve transparency.

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: a one-sentence summary followed by detailed explanation of validation, parameter list, and return values. It is front-loaded with purpose. While slightly verbose, every sentence adds value.

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 tool's complexity (3 params, output schema), the description covers purpose, usage context, validation rules, parameter details, and return values. It lacks explicit mention of prerequisites (e.g., course must exist, lessons.json must be present) but overall is adequately 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 0%, but the description compensates with clear explanations for each parameter. Slug: selects the folder path. lesson_id: must match an id in lessons.json for filename building. content: full markdown with required sections. This adds significant meaning beyond the parameter names.

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 the tool's purpose as 'Step 5 of the course build — save one drafted lesson to disk.' It specifies the verb (save), resource (drafted lesson), and context (course build), distinguishing it from siblings like save_course_curriculum or publish_course.

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 provides clear context: 'call it once per lesson during drafting.' It implies when to use (during the drafting phase) and sets expectations about the required content sections. However, it does not explicitly state when not to use or compare to alternative tools, but the step context is sufficient.

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'

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