Skip to main content

Reading Test Commands

All Reading commands live in src/core/src/commands/reading_tests.rs, reading_passages.rs, reading_question_groups.rs, and reading_questions.rs, delegating to matching repository files.

reading_tests

CommandTS wrapperSignature
get_reading_testsgetReadingTest(id, userId)Promise<ReadingTest | null>
list_reading_testslistReadingTests(userId)Promise<ReadingTest[]> — includes own drafts + all published tests
create_reading_testscreateReadingTest(userId, input)Promise<string> (new id)
update_reading_testsupdateReadingTest(id, userId, input)Promise<void>
delete_reading_testsdeleteReadingTest(id, userId)Promise<void>
const id = await createReadingTest(userId, {
title: "Cambridge IELTS 18 – Test 3",
test_type: "Academic",
difficulty: "7",
duration: "60 mins",
status: "draft",
});

reading_passages

CommandTS wrapper
list_reading_passageslistReadingPassages(userId)
create_reading_passagescreateReadingPassage(userId, { test_id, passage_number?, title?, content?, notes? })
delete_reading_passagesdeleteReadingPassage(id, userId)

reading_question_groups

CommandTS wrapper
list_reading_question_groupslistReadingQuestionGroups(userId)
create_reading_question_groupscreateReadingQuestionGroup(userId, { passage_id, group_order?, question_type?, instructions?, word_limit?, has_word_bank?, word_bank?, sequential_order?, multiple_selection?, select_count? })
delete_reading_question_groupsdeleteReadingQuestionGroup(id, userId)

reading_questions

CommandTS wrapper
list_reading_questionslistReadingQuestions(userId)
create_reading_questionscreateReadingQuestion(userId, { group_id, question_order?, text?, answer?, options?, matching_pairs?, completion_gaps?, accepted_answers? })
delete_reading_questionsdeleteReadingQuestion(id, userId)
const groupId = await createReadingQuestionGroup(userId, {
passage_id: passageId,
question_type: "matching",
instructions: "Match each statement to the correct paragraph.",
});

await createReadingQuestion(userId, {
group_id: groupId,
text: "Which paragraph mentions early urban planning?",
matching_pairs: JSON.stringify([{ label: "A", value: "paragraph-2" }]),
});

Full field definitions: Database Schema. No update/get-single commands exist for passages, question groups, or questions today — only list/create/delete.