Tools
list_courses, search_lessons, list_lessons, get_lesson, get_chunk, create_course, add_lesson, add_lessons_from_markdown, add_course_from_directory, create_flashcard, append_note, generate_presentation, create_presentation, update_presentation, replace_presentation_slides, add_presentation_slide, update_presentation_slide, get_presentation, list_presentations.
Read
list_coursesList every course with its id and completion progress. Call this first to discover course ids for scoping.
search_lessonsHybrid semantic + keyword search across lesson content (local embeddings, no API key). Returns the most relevant sections.
| Name | Type | Default | Description |
|---|---|---|---|
| query* | string | — | Natural-language search query. |
| course_id | string | — | Restrict to one course id (from list_courses). Omit to search the whole library. |
| limit | integer (1–20) | 8 | Max sections to return. |
list_lessonsList lesson titles within a course, optionally filtered to one module.
| Name | Type | Default | Description |
|---|---|---|---|
| course_title* | string | — | Course title substring (case-insensitive). |
| module_name | string | — | Optional module-name substring filter. |
get_lessonFetch the full markdown body of one lesson by lesson_id.
| Name | Type | Default | Description |
|---|---|---|---|
| lesson_id* | string | — | The lesson UUID (from search_lessons or list_lessons). |
get_chunkFetch one lesson section by lesson_id + anchor, as returned by search_lessons. Use to read a hit in full when the preview was truncated.
| Name | Type | Default | Description |
|---|---|---|---|
| lesson_id* | string | — | The lesson UUID. |
| anchor* | string | — | The chunk anchor slug from a search hit. |
Write
These tools create courses, lessons, flashcards, and notes in your workspace. Course and lesson writes are searchable (keyword + semantic) immediately — sections are built and embedded inline with the write. Note text enters semantic search asynchronously.
create_courseCreate a new, empty course and return its course_id. Call this first when building a course from scratch, then add_lesson / add_lessons_from_markdown.
| Name | Type | Default | Description |
|---|---|---|---|
| title* | string | — | Course title. |
| source_url | string | — | Provenance URL (must be unique). A learnos://manual/<id> URL is generated if omitted. |
add_lessonAppend ONE markdown document to a course as a single lesson. If title is omitted, the document's H1 is used — same parsing as the GitHub crawl, minus the fetch.
| Name | Type | Default | Description |
|---|---|---|---|
| course_id* | string | — | Target course id (from list_courses / create_course). |
| content_md* | string | — | The lesson's markdown body. |
| title | string | — | Lesson title. Omit to use the document's H1. |
| module_name | string | — | Optional module / section name. |
| base_url | string | — | Base URL/dir to resolve relative links & images against. |
add_lessons_from_markdownSplit ONE markdown document into MULTIPLE lessons (H2 → module, H3 → lesson, the single-README crawl rule) and append them all to a course.
| Name | Type | Default | Description |
|---|---|---|---|
| course_id* | string | — | Target course id. |
| markdown* | string | — | A markdown document with H2 modules and H3 lessons. |
| base_url | string | — | Base URL/dir to resolve relative links & images against. |
add_course_from_directoryWalk a local NN-module/NN-lesson/README.md tree on the server's filesystem and import every README as a lesson — the GitHub crawl, minus the fetch. Omit course_id to create a new course (requires title); pass course_id to append (never destructive).
| Name | Type | Default | Description |
|---|---|---|---|
| dir* | string | — | ABSOLUTE path to the course directory. The server's cwd is the repo root, not your client's project. |
| title | string | — | Course title — required when creating (course_id omitted). |
| course_id | string | — | Append to this existing course id. Omit to create a new course. |
| base_url | string | — | Base URL to rewrite relative links/images against (e.g. a github blob base). Left relative if omitted. |
create_flashcardCreate a flashcard (front question + back answer) on a lesson. Appears in the lesson's deck immediately.
| Name | Type | Default | Description |
|---|---|---|---|
| lesson_id* | string | — | The lesson UUID the card belongs to. |
| question* | string | — | Front / question. |
| answer* | string | — | Back / answer. |
append_noteAppend a timestamped markdown note entry to a lesson's notes.
| Name | Type | Default | Description |
|---|---|---|---|
| lesson_id* | string | — | The lesson UUID the note belongs to. |
| content_md* | string | — | Markdown body of the note. |
Presentations
Short slide decks for team kickoffs when a course is assigned. View at
/presentations/<id>; download .pptx from /api/presentations/<id>/pptx.
Ready decks are readable by anyone with course access; only the owner can edit.
generate_presentationAI-generate a 6–12 slide deck from a course, module, or lesson. Default purpose is intro (syllabus-aware kickoff template).
| Name | Type | Default | Description |
|---|---|---|---|
| scope_type* | 'lesson' | 'module' | 'course' | — | Prefer 'course' for team intros. |
| course_id* | string | — | Course UUID. |
| lesson_id | string | — | Required when scope_type='lesson'. |
| module_name | string | — | Required when scope_type='module'. |
| purpose | 'intro' | 'overview' | 'summary' | intro | Deck intent. |
| force | boolean | false | Bypass sources_hash cache. |
create_presentationCreate a presentation from an explicit slides array (agent-authored).
| Name | Type | Default | Description |
|---|---|---|---|
| course_id* | string | — | Course UUID. |
| title* | string | — | Deck title. |
| slides* | array | — | Ordered slides with title, optional body_md / speaker_notes_md / layout. |
| scope_type | 'lesson' | 'module' | 'course' | course | Scope. |
| purpose | 'intro' | 'overview' | 'summary' | intro | Deck intent. |
update_presentationUpdate title and/or purpose on a presentation you own.
| Name | Type | Default | Description |
|---|---|---|---|
| presentation_id* | string | — | Presentation UUID. |
| title | string | — | New deck title. |
| purpose | 'intro' | 'overview' | 'summary' | — | New purpose. |
replace_presentation_slidesReplace ALL slides on a presentation you own.
| Name | Type | Default | Description |
|---|---|---|---|
| presentation_id* | string | — | Presentation UUID. |
| slides* | array | — | New ordered slides array. |
add_presentation_slideAppend or insert one slide on a presentation you own.
| Name | Type | Default | Description |
|---|---|---|---|
| presentation_id* | string | — | Presentation UUID. |
| title* | string | — | Slide title. |
| body_md | string | — | Markdown body. |
| position | integer | — | 0-based insert index; omit to append. |
update_presentation_slidePatch one slide by 0-based position on a presentation you own.
| Name | Type | Default | Description |
|---|---|---|---|
| presentation_id* | string | — | Presentation UUID. |
| position* | integer | — | 0-based slide index. |
| title | string | — | New title. |
| body_md | string | — | New body. |
get_presentationRead one presentation by id — metadata plus ordered slides (owner any status; others only ready + course access).
| Name | Type | Default | Description |
|---|---|---|---|
| id* | string | — | Presentation UUID. |
list_presentationsList presentations. Default: yours. mine_only=false includes course-shared ready decks.
| Name | Type | Default | Description |
|---|---|---|---|
| course_id | string | — | Optional course UUID filter. |
| mine_only | boolean | true | Set false to include shared ready decks. |
YouTube
Capture a YouTube video as a video lesson, then author it from the transcript.
add_youtube_video fetches from youtube.com, so the server must run where
YouTube is reachable. Captions-only in v1. The capture → author loop is:
add_youtube_video → get_transcript → update_lesson_content.
add_youtube_videoCapture a YouTube video as a video lesson: fetch its timestamped transcript (captions), store the raw segments, and write a transcript scaffold as the body. Re-capturing the same video reuses the existing lesson.
| Name | Type | Default | Description |
|---|---|---|---|
| url* | string | — | YouTube URL or 11-char video id. |
| course_id | string | — | Append to this course id. Omit to create a new 1-video course. |
| title | string | — | Course title when creating (defaults to the video title). |
| force | boolean | false | Re-fetch and replace an already-captured video's raw transcript; leaves content_md untouched. |
get_transcriptFetch a video lesson's raw timestamped transcript (one [h:mm:ss] line per segment) — the source for authoring.
| Name | Type | Default | Description |
|---|---|---|---|
| lesson_id* | string | — | The video lesson's UUID. |
update_lesson_contentOverwrite a lesson's markdown body (the authoring write-back: replace a video lesson's transcript scaffold with a synthesized, research-enriched lesson). Place an HTML comment `<!--t:SECONDS-->` after a heading to make that section seek the player.
| Name | Type | Default | Description |
|---|---|---|---|
| lesson_id* | string | — | The lesson UUID to overwrite. |
| content_md* | string | — | The new full markdown body. |