attach_library_item
ChatGPTAttach a library item to a class session. An assignment becomes homework for that session with its questions copied in; a document adds its materials to the session, or becomes homework when target is homework. Decks cannot be attached. Find session ids with list_course_sessions.
create_enrollment
ChatGPTEnroll a student in a per-course (fixed term) course with the course's default plan. Slot-mode courses (weekly slots, monthly billing) are rejected: enrol those in the app.
create_lesson_plan_template
ChatGPTCreate a reusable lesson plan template. content is Markdown. Owners, admins and instructors.
create_library_folder
ChatGPTCreate an org library folder. Omit parent_id or use null for root. Live sibling names must be unique. Staff only.
create_library_item
ChatGPTCreate a library item in the org, optionally with its content in the same call: questions for assignment, cards for deck (at most 40), links for document. Files cannot be uploaded here. When any question is invalid nothing is saved and every problem is listed by index. Question shapes by kind (options and correct are stored exactly as sent). mcq and true_false: options [{key, label, explanation?}], correct [one option key]. multi_select: options as mcq, correct [two or more option keys]. short_text: correct [1 to 3 accepted answers], hint? for a structure cue kept out of the prompt. rewrite: correct [accepted rewrites]. open_ended: no options or correct, graded by the teacher. fill_in_blanks: prompt holds numbered blanks {{1}}, {{2}}; correct [[accepted answers for blank 1], [for blank 2]]; options {bank: [words]} optional, and when given it must contain an accepted answer for every blank. table_fill_in: options {grid: [[{text, answerable}]]} at most 6 by 6, answer cells have answerable true and empty text; correct {"row_col": [accepted answers]} per answer cell, zero based, e.g. "1_2". matching: options {items: [{key, text}], choices: [{key, text}], reusable?}, at most 12 each; correct {item_key: choice_key} for every item. ordering: options {tiles: [{key, text}]} listed in the correct order, 2 to 12 tiles; correct [every tile key in the correct order]. speaking: options {prep_seconds 0 to 60, max_seconds 15 to 300}, no correct. passage: prompt is the reading text, children [2 to 6 questions of any other kind] about it. explanation? on any kind except passage: one short sentence on why the answer is right. Wrap an underlined part of a prompt or label in (fea**ture renders "ea" underlined); no other formatting renders.
create_student
ChatGPTCreate a student in the authorized org. A full name is required; phone and email are optional.
get_course
ChatGPTGet a single course by id (org-scoped + Pundit-gated).
get_enrollment
ChatGPTGet a single enrollment by id (org-scoped + Pundit-gated).
get_help
ChatGPTThe StuMana user guide, for how-to questions about the app: students, courses, attendance, tuition, salary, import, settings, Mana and more. Call with no slug to list the topics this user's role and the centre's plan can see, then pass a slug to read that topic in full. Every result carries the centre's live setup so answers match what it actually has. The guide is written in Vietnamese; answer in the language the user asked in.
get_kpi_summary
ChatGPTHeadline KPIs for the authorized org, the same figures as the StuMana Reports hub tiles: collected, uncollected and overdue tuition, new enrollments, sessions today and last month's revenue, plus deltas (signed % vs the previous period, null when that period was zero). Owners and admins only. range: month (this calendar month, default), 7d, 30d or 90d.
get_lesson_plan
ChatGPTThe lesson plan of one class session: title, objectives, materials, content, teacher note, timed steps and whether it is published. lesson_plan is null when the session has none yet. Find session ids with list_course_sessions.
get_library_item
ChatGPTOne library item with its content: questions (quiz, assignment) in the exact shape set_quiz_questions accepts, cards (deck), or link materials (document, material). Staff only.
get_payment_slip
ChatGPTThe data for a tuition slip (phiếu học phí) for an unpaid invoice or a receipt (phiếu thu học phí) for a paid one, as JSON. kind is "invoice" or "receipt". Layout, style and how the slip is made are up to the user; follow rules so every value and the QR are correct. lines are the fee rows and session_fees groups the billed sessions by price with their dates. For an unpaid invoice, payment.qr_html is an HTML snippet that draws the VietQR in the page, so it shows where images from other sites are blocked; payment.qr_image_url is the same code as a PNG. Money is in VND.
get_report
ChatGPTReport data for the authorized org as JSON { columns, rows, summary }, ready to chart or build a dashboard from. Owners and admins only. Reports use start_date..end_date (default: the last 30 days), except receivables (aging as of end_date) and financial_overview (the trailing 12 calendar months, newest first). branch_id narrows revenue, attendance, enrollments, student_progress and instructor_performance; course_id narrows attendance. Money is in the org's currency (VND).
get_session_roster
ChatGPTStudents of a session's course with their attendance status for that session (staff only).
get_student
ChatGPTGet a single student by id (org-scoped + Pundit-gated).
list_attendance
ChatGPTList attendance records, filterable by course_session_id and/or student_id.
list_course_sessions
ChatGPTList course sessions, optionally filtered by course_id.
list_courses
ChatGPTList courses in the authorized org (Pundit-scoped to caller).
list_enrollments
ChatGPTList enrollments in the authorized org, filterable by student or course.
list_lesson_plan_templates
ChatGPTThe org's lesson plan templates, most recently edited first. Pass an id as template_id to upsert_lesson_plan to prefill a new plan.
list_library_folders
ChatGPTList the org's live folder tree, alphabetically, with parent IDs, full paths and direct item counts. Staff only.
list_library_items
ChatGPTList the org's library items (quizzes, assignments, flashcard decks, documents, materials), newest first. Staff only. Use get_library_item for the questions, cards or links of one item.
list_payments
ChatGPTList invoices (payments) in the authorized org, newest due date first, filterable by student and status. Pass an id to get_payment_slip to build a tuition slip or receipt. Money is in VND.
list_students
ChatGPTList students in the authorized org (Pundit-scoped to caller).
mark_attendance
ChatGPTMark a student's attendance for a course session (org-scoped, Pundit-gated).
move_library_items
ChatGPTMove live library items and/or folders atomically. No deletion. Returns new paths and undo moves to pass to this tool. Staff only.
set_flashcards
ChatGPTAdd cards to a flashcard deck library item (mode append, default) or replace all of them (mode replace). A deck holds at most 40 cards; cards whose front repeats an existing card, or past that limit, are skipped. back_vi is the Vietnamese answer side shown to Vietnamese readers.
set_quiz_questions
ChatGPTAdd questions to a quiz or assignment library item (mode append, default) or replace all of them (mode replace). An item holds at most 100 top level questions. When any question is invalid nothing is saved and every problem is listed by index (and child_index for passage sub-questions); fix them and resend the whole batch. get_library_item returns existing questions in this same shape. Question shapes by kind (options and correct are stored exactly as sent). mcq and true_false: options [{key, label, explanation?}], correct [one option key]. multi_select: options as mcq, correct [two or more option keys]. short_text: correct [1 to 3 accepted answers], hint? for a structure cue kept out of the prompt. rewrite: correct [accepted rewrites]. open_ended: no options or correct, graded by the teacher. fill_in_blanks: prompt holds numbered blanks {{1}}, {{2}}; correct [[accepted answers for blank 1], [for blank 2]]; options {bank: [words]} optional, and when given it must contain an accepted answer for every blank. table_fill_in: options {grid: [[{text, answerable}]]} at most 6 by 6, answer cells have answerable true and empty text; correct {"row_col": [accepted answers]} per answer cell, zero based, e.g. "1_2". matching: options {items: [{key, text}], choices: [{key, text}], reusable?}, at most 12 each; correct {item_key: choice_key} for every item. ordering: options {tiles: [{key, text}]} listed in the correct order, 2 to 12 tiles; correct [every tile key in the correct order]. speaking: options {prep_seconds 0 to 60, max_seconds 15 to 300}, no correct. passage: prompt is the reading text, children [2 to 6 questions of any other kind] about it. explanation? on any kind except passage: one short sentence on why the answer is right. Wrap an underlined part of a prompt or label in (fea**ture renders "ea" underlined); no other formatting renders.
update_lesson_plan_template
ChatGPTUpdate a lesson plan template; only the fields sent change. content is Markdown. Owners and admins edit any template, instructors only their own.
update_library_folder
ChatGPTRename or change the color/icon of a live org library folder. Use move_library_items to change its parent. Staff only.
update_library_item
ChatGPTUpdate a library item's title, description, tags or color. The type cannot change. Sessions the item was attached to pick up the change, as they do after a web edit. Links given here are added to a document or material item.
upsert_lesson_plan
ChatGPTCreate the lesson plan of a class session, or update it when the session already has one (a session holds one plan). Only the fields sent change. content is Markdown. steps, when sent, replace every existing step in order. template_id prefills a new plan from a lesson plan template, and the fields sent win over the template. publish: a new plan stays a draft unless publish is true; true shows it on the public lesson feed and notifies families, false turns it back into a draft, omitted keeps an existing plan's state. Families only hear about it when publish is true. The signed-in parent portal lists the plan either way.