sentra-mcp
v1.1.0Sentra — local-first MCP server for mock exam generation
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_workflow_prompts
List the prompts-first pipeline in order (names, output files, usage). Start here: run the prompts in order; tools only supply evidence. The user just drops PDFs into lectures/ and past_exams/.
get_workflow_prompt
Get one pipeline prompt text verbatim (no schema, agent infers structure). OCR note: server extraction has no OCR — scanned PDFs return insufficient_text=true; never invent text for them.
| Parameter | Type | Description |
|---|---|---|
name * | string | Prompt name: extract_text, knowledge_base, professor_dna, exam_targets, predicted_exam. |
save_pipeline_file
Save one pipeline markdown file (schemaless, prompt defines structure). Only safety checks: known filename, non-empty, size cap, stay inside course dir, no silent overwrite.
| Parameter | Type | Description |
|---|---|---|
filename * | string | Pipeline file: knowledge_base.md, professor_dna.md, exam_targets.md, predicted_exam.md. Saved under output/. |
markdown * | string | Free-form markdown produced from the corresponding prompt (structure inferred from prompt, not validated). |
course_dir | Optional course dir override. | |
overwrite | boolean | Must be true to replace an existing file. |
start_pipeline
One-call pipeline start: file listing + ordered steps + step-1 prompt. The user just adds PDFs; the agent follows the prompts in order and saves each .md with save_pipeline_file.
| Parameter | Type | Description |
|---|---|---|
course_dir | Optional course dir override. |
list_course_pdfs
List lecture and past-exam PDFs in the course directory. Distinguishes lectures/ from past_exams/, reports unreadable files. Never accesses files outside the permitted course directory.
| Parameter | Type | Description |
|---|---|---|
course_dir | Optional absolute course dir override. Defaults to SENTRA_COURSE_DIR, else the opened folder (auto-created). |
extract_pdf_text
Extract text from one PDF, preserving page numbers and filename refs. Streams only the requested page window (max 50 pages / 60000 chars per call). Reports corrupt files and insufficient-text (scanned) files instead of returning silent empty content. No OCR in MVP.
| Parameter | Type | Description |
|---|---|---|
relative_path * | string | Path relative to course dir, e.g. 'lectures/lecture_01.pdf'. |
course_dir | Optional course dir override. | |
page_end | 1-based last page inclusive. Defaults to end (capped). | |
page_start | integer | 1-based first page. |
analyze_past_exams
Analyze past exams for question types, templates, difficulty, marks. Heuristic, deterministic prep for the AI client. Every finding cites source filenames + page numbers. Past patterns only — never claims to exactly predict the professor's next exam.
| Parameter | Type | Description |
|---|---|---|
course_dir | Optional course dir override. |
prepare_exam_brief
Validate an exam spec and build a grounded generation brief for the AI client. Returns brief_markdown (spec + style evidence + lecture excerpts with file:page refs + writer constraints) plus warnings for unsupported topics. The MCP server does not call any model; OpenCode writes the questions.
| Parameter | Type | Description |
|---|---|---|
spec * | object | Exam spec: course_name, duration_minutes, num_questions, question_types[], difficulty{easy,medium,hard}, topics?, total_marks?, language?. |
course_dir | Optional course dir override. |
save_exam_files
Validate separation and save exam + answer key under output/. Predictable filenames, no silent overwrite, paths stay inside the course dir.
| Parameter | Type | Description |
|---|---|---|
answer_key_markdown * | string | Separate answer key with explanations + source refs. |
basename * | string | Safe name, e.g. 'os_midterm_mock1'. Creates output/<basename>_exam.md + _answers.md. |
exam_markdown * | string | Student-facing exam markdown (no answers). |
course_dir | Optional course dir override. | |
overwrite | boolean | Must be true to replace existing files. |