LearnOS docs
MCP server

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_courses

List every course with its id and completion progress. Call this first to discover course ids for scoping.

Returns
Markdown list of courses with id and N/total lesson progress.
search_lessons

Hybrid semantic + keyword search across lesson content (local embeddings, no API key). Returns the most relevant sections.

Parameters
NameTypeDefaultDescription
query*stringNatural-language search query.
course_idstringRestrict to one course id (from list_courses). Omit to search the whole library.
limitinteger (1–20)8Max sections to return.
Returns
Markdown listing each hit: lesson title, heading path, course, lesson_id, anchor, and the section text (truncated to ~2400 chars with a get_chunk hint).
list_lessons

List lesson titles within a course, optionally filtered to one module.

Parameters
NameTypeDefaultDescription
course_title*stringCourse title substring (case-insensitive).
module_namestringOptional module-name substring filter.
Returns
Markdown list of lessons with their lesson_id.
get_lesson

Fetch the full markdown body of one lesson by lesson_id.

Parameters
NameTypeDefaultDescription
lesson_id*stringThe lesson UUID (from search_lessons or list_lessons).
Returns
Markdown — header with course/module + the lesson body (capped to ~24k chars).
get_chunk

Fetch one lesson section by lesson_id + anchor, as returned by search_lessons. Use to read a hit in full when the preview was truncated.

Parameters
NameTypeDefaultDescription
lesson_id*stringThe lesson UUID.
anchor*stringThe chunk anchor slug from a search hit.
Returns
Markdown — the section's heading path and full body.

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_course

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

Parameters
NameTypeDefaultDescription
title*stringCourse title.
source_urlstringProvenance URL (must be unique). A learnos://manual/<id> URL is generated if omitted.
Returns
A confirmation message with the new course_id.
add_lesson

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

Parameters
NameTypeDefaultDescription
course_id*stringTarget course id (from list_courses / create_course).
content_md*stringThe lesson's markdown body.
titlestringLesson title. Omit to use the document's H1.
module_namestringOptional module / section name.
base_urlstringBase URL/dir to resolve relative links & images against.
Returns
A confirmation message listing the created lesson(s) and their lesson_id.
add_lessons_from_markdown

Split ONE markdown document into MULTIPLE lessons (H2 → module, H3 → lesson, the single-README crawl rule) and append them all to a course.

Parameters
NameTypeDefaultDescription
course_id*stringTarget course id.
markdown*stringA markdown document with H2 modules and H3 lessons.
base_urlstringBase URL/dir to resolve relative links & images against.
Returns
A confirmation message listing every created lesson and its lesson_id.
add_course_from_directory

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

Parameters
NameTypeDefaultDescription
dir*stringABSOLUTE path to the course directory. The server's cwd is the repo root, not your client's project.
titlestringCourse title — required when creating (course_id omitted).
course_idstringAppend to this existing course id. Omit to create a new course.
base_urlstringBase URL to rewrite relative links/images against (e.g. a github blob base). Left relative if omitted.
Returns
A confirmation message listing the imported lessons and their lesson_id.
create_flashcard

Create a flashcard (front question + back answer) on a lesson. Appears in the lesson's deck immediately.

Parameters
NameTypeDefaultDescription
lesson_id*stringThe lesson UUID the card belongs to.
question*stringFront / question.
answer*stringBack / answer.
Returns
A confirmation message.
append_note

Append a timestamped markdown note entry to a lesson's notes.

Parameters
NameTypeDefaultDescription
lesson_id*stringThe lesson UUID the note belongs to.
content_md*stringMarkdown body of the note.
Returns
A confirmation message. Note: the search index is NOT updated here.

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_presentation

AI-generate a 6–12 slide deck from a course, module, or lesson. Default purpose is intro (syllabus-aware kickoff template).

Parameters
NameTypeDefaultDescription
scope_type*'lesson' | 'module' | 'course'Prefer 'course' for team intros.
course_id*stringCourse UUID.
lesson_idstringRequired when scope_type='lesson'.
module_namestringRequired when scope_type='module'.
purpose'intro' | 'overview' | 'summary'introDeck intent.
forcebooleanfalseBypass sources_hash cache.
Returns
Confirmation with id, title, slide count, view path, and pptx path.
create_presentation

Create a presentation from an explicit slides array (agent-authored).

Parameters
NameTypeDefaultDescription
course_id*stringCourse UUID.
title*stringDeck title.
slides*arrayOrdered slides with title, optional body_md / speaker_notes_md / layout.
scope_type'lesson' | 'module' | 'course'courseScope.
purpose'intro' | 'overview' | 'summary'introDeck intent.
Returns
Confirmation with id, title, slide count, view path, and pptx path.
update_presentation

Update title and/or purpose on a presentation you own.

Parameters
NameTypeDefaultDescription
presentation_id*stringPresentation UUID.
titlestringNew deck title.
purpose'intro' | 'overview' | 'summary'New purpose.
Returns
Confirmation with updated metadata.
replace_presentation_slides

Replace ALL slides on a presentation you own.

Parameters
NameTypeDefaultDescription
presentation_id*stringPresentation UUID.
slides*arrayNew ordered slides array.
Returns
Confirmation with new slide count.
add_presentation_slide

Append or insert one slide on a presentation you own.

Parameters
NameTypeDefaultDescription
presentation_id*stringPresentation UUID.
title*stringSlide title.
body_mdstringMarkdown body.
positioninteger0-based insert index; omit to append.
Returns
Confirmation with new slide count.
update_presentation_slide

Patch one slide by 0-based position on a presentation you own.

Parameters
NameTypeDefaultDescription
presentation_id*stringPresentation UUID.
position*integer0-based slide index.
titlestringNew title.
body_mdstringNew body.
Returns
Confirmation for the patched slide.
get_presentation

Read one presentation by id — metadata plus ordered slides (owner any status; others only ready + course access).

Parameters
NameTypeDefaultDescription
id*stringPresentation UUID.
Returns
Metadata header plus each slide's title, body, and notes.
list_presentations

List presentations. Default: yours. mine_only=false includes course-shared ready decks.

Parameters
NameTypeDefaultDescription
course_idstringOptional course UUID filter.
mine_onlybooleantrueSet false to include shared ready decks.
Returns
Markdown list of presentations with id, purpose, and view path.

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

add_youtube_video

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

Parameters
NameTypeDefaultDescription
url*stringYouTube URL or 11-char video id.
course_idstringAppend to this course id. Omit to create a new 1-video course.
titlestringCourse title when creating (defaults to the video title).
forcebooleanfalseRe-fetch and replace an already-captured video's raw transcript; leaves content_md untouched.
Returns
A confirmation with lesson_id, course_id, and transcript segment count. Searchable (keyword + semantic) immediately.
get_transcript

Fetch a video lesson's raw timestamped transcript (one [h:mm:ss] line per segment) — the source for authoring.

Parameters
NameTypeDefaultDescription
lesson_id*stringThe video lesson's UUID.
Returns
Markdown — a header plus the timestamped transcript (capped to ~24k chars). Empty for non-video lessons.
update_lesson_content

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

Parameters
NameTypeDefaultDescription
lesson_id*stringThe lesson UUID to overwrite.
content_md*stringThe new full markdown body.
Returns
A confirmation message. Searchable (keyword + semantic) immediately.

On this page

Command Palette

Search for a command to run...