sentra-mcp

v1.1.0
sentra-mcp Checked 2 days ago Published 1 month ago

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

ParameterTypeDescription
name *stringPrompt 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.

ParameterTypeDescription
filename *stringPipeline file: knowledge_base.md, professor_dna.md, exam_targets.md, predicted_exam.md. Saved under output/.
markdown *stringFree-form markdown produced from the corresponding prompt (structure inferred from prompt, not validated).
course_dirOptional course dir override.
overwritebooleanMust 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.

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

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

ParameterTypeDescription
relative_path *stringPath relative to course dir, e.g. 'lectures/lecture_01.pdf'.
course_dirOptional course dir override.
page_end1-based last page inclusive. Defaults to end (capped).
page_startinteger1-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.

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

ParameterTypeDescription
spec *objectExam spec: course_name, duration_minutes, num_questions, question_types[], difficulty{easy,medium,hard}, topics?, total_marks?, language?.
course_dirOptional 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.

ParameterTypeDescription
answer_key_markdown *stringSeparate answer key with explanations + source refs.
basename *stringSafe name, e.g. 'os_midterm_mock1'. Creates output/<basename>_exam.md + _answers.md.
exam_markdown *stringStudent-facing exam markdown (no answers).
course_dirOptional course dir override.
overwritebooleanMust be true to replace existing files.