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.
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. |
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. |