{"openapi":"3.1.0","info":{"title":"Academia Inteligente Developer API","version":"v1","description":"Manage one academy from your own systems: read students, courses and results, add and enroll students, send notices, grade, schedule live classes and more.\n\nEvery key belongs to exactly one academy, fixed when an admin creates it in the panel under **Desarrolladores**. There is no academy parameter: the key decides. The key acts as the admin who created it, with that person's current role (at most admin, even for the owner), limited to the scopes ticked on the key.\n\nEach operation is a tool: `POST /tools/{name}` with the arguments as a JSON object. Write tools that change many records accept `dry_run: true` to preview first."},"servers":[{"url":"https://academiainteligente.com/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Developer API key (`lms_sk_…`). `X-Api-Key: lms_sk_…` also works."}},"schemas":{"Error":{"type":"object","required":["ok","error"],"properties":{"ok":{"const":false},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"English explanation."},"message_es":{"type":"string","description":"Spanish explanation, when the tool wrote one."},"details":{"description":"Extra context, e.g. which argument is invalid."}}}}}},"responses":{"Unauthorized":{"description":"Missing, invalid, revoked or expired key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The key may not do this: missing scope, role too low, IP not allowed, or its creator left the academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Too many requests for this key; retry after a minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/me":{"get":{"operationId":"getMe","summary":"Who this key is","description":"The academy the key belongs to, the person it acts as (with their current role), and the key's scopes and expiry. Use it to test a key.","tags":["key"],"responses":{"200":{"description":"The key's identity.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{"type":"object","properties":{"academy":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"}}},"acts_as":{"type":"object","properties":{"name":{"type":["string","null"]},"email":{"type":"string"},"role":{"enum":["owner","admin","instructor"]}}},"key":{"type":"object","properties":{"name":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"expires_at":{"type":["string","null"],"format":"date-time"}}},"rate_limit":{"type":"object","properties":{"requests":{"type":"integer"},"window_seconds":{"type":"integer"}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools":{"get":{"operationId":"listTools","summary":"Tools this key can call","description":"Only the tools allowed by the key's scopes, its creator's current role and the academy's modules. Each item includes its JSON Schema.","tags":["key"],"responses":{"200":{"description":"The callable tools.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{"type":"object","properties":{"tools":{"type":"array","items":{"type":"object"}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_academy_overview":{"post":{"operationId":"get_academy_overview","summary":"Resumen de la academia","description":"Global KPIs of the academy for a date window: published courses, enrolled and active students, completions, new enrollments, lesson views, top courses and top students. Start here when the teacher asks how the academy is doing.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"range":{"description":"Preset window for activity figures. Default 30d.","type":"string","enum":["7d","30d","90d","365d","all"]},"from":{"description":"First day, inclusive. Overrides `range`.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"description":"Last day, inclusive. Overrides `range`.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/list_courses":{"post":{"operationId":"list_courses","summary":"Cursos de la academia","description":"Every course in the academy with its id, status (draft/published), enrolled students, completion rate, lesson count and views in the window. Use the ids with the other tools.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"range":{"description":"Preset window for activity figures. Default 30d.","type":"string","enum":["7d","30d","90d","365d","all"]},"from":{"description":"First day, inclusive. Overrides `range`.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"description":"Last day, inclusive. Overrides `range`.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_course_metrics":{"post":{"operationId":"get_course_metrics","summary":"Métricas de un curso","description":"One course in depth: enrolled, active and completed students, average completion, watch time, and per-lesson views and completion so you can spot the lesson where students drop off.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"course_id":{"type":"string","format":"uuid","description":"Course id (UUID)."},"range":{"description":"Preset window for activity figures. Default 30d.","type":"string","enum":["7d","30d","90d","365d","all"]},"from":{"description":"First day, inclusive. Overrides `range`.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"description":"Last day, inclusive. Overrides `range`.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["course_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/find_students":{"post":{"operationId":"find_students","summary":"Buscar alumnos","description":"Search and filter the academy's students. Combine filters: name/email text, course, group, days without activity, progress range, access expiring soon. Returns progress, last activity, courses and quiz average per student. progress_pct and lessons_done count lessons marked as completed; lessons_opened counts lessons the student opened, so a student can read without marking. Last activity is the latest of campus visits, lesson views, completions, quiz attempts and sessions.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"description":"Part of the name or email.","type":"string","maxLength":120},"course_id":{"type":"string","format":"uuid","description":"Only students with access to this course (UUID)."},"group_id":{"type":"string","format":"uuid","description":"Only members of this group (UUID)."},"inactive_days":{"description":"No activity in at least this many days (never active included).","type":"integer","minimum":1,"maximum":365},"max_progress_pct":{"type":"number","minimum":0,"maximum":100},"min_progress_pct":{"type":"number","minimum":0,"maximum":100},"access_expires_within_days":{"type":"integer","minimum":0,"maximum":365},"sort":{"description":"Default name.","type":"string","enum":["name","progress","inactivity","access_expiry"]},"limit":{"description":"Default 50.","type":"integer","minimum":1,"maximum":200}}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_student":{"post":{"operationId":"get_student","summary":"Ficha de un alumno","description":"Everything about one student: courses with progress and access dates, connected time, quiz attempts and scores, groups, risk signals, and a link to their card in the panel.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"student_id":{"type":"string","format":"uuid","description":"Student user id (UUID)."},"email":{"description":"Student email, instead of student_id.","type":"string","format":"email"},"range":{"description":"Preset window for activity figures. Default 30d.","type":"string","enum":["7d","30d","90d","365d","all"]},"from":{"description":"First day, inclusive. Overrides `range`.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"description":"Last day, inclusive. Overrides `range`.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_students_at_risk":{"post":{"operationId":"get_students_at_risk","summary":"Alumnos en riesgo","description":"Students likely to drop out, scored 0–100 with the reasons: never started, days without activity, low progress for the time enrolled, failing quizzes, access about to expire with work left. Optionally for one course. Progress counts lessons marked as completed; when lessons_opened is higher, say the student reads without marking lessons rather than that they did nothing.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"course_id":{"type":"string","format":"uuid","description":"Limit to one course (UUID)."},"min_level":{"description":"Default medium.","type":"string","enum":["high","medium"]},"limit":{"description":"Default 30.","type":"integer","minimum":1,"maximum":200}}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_quiz_insights":{"post":{"operationId":"get_quiz_insights","summary":"Dónde fallan en los tests","description":"For one course (optionally one lesson): the quiz questions answered wrong most often, the wrong answers students pick, and the number of attempts. Use it to find concepts to reinforce.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"course_id":{"type":"string","format":"uuid","description":"Course id (UUID)."},"lesson_id":{"type":"string","format":"uuid","description":"Only this lesson (UUID)."},"days":{"description":"Look back this many days. Default 90.","type":"integer","minimum":1,"maximum":3650}},"required":["course_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_pending_work":{"post":{"operationId":"get_pending_work","summary":"Pendientes del profesor","description":"What needs the teacher today: submissions and essays waiting for a grade, unread student messages, live classes in the next 7 days and access that expires in the next 7 days.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/list_assignment_submissions":{"post":{"operationId":"list_assignment_submissions","summary":"Entregas de tareas","description":"Assignment deliveries and quiz essay answers. Default: waiting for a grade, oldest first. Includes the student's text (trimmed) so you can draft feedback, and ai_suggestion when one exists: for a quiz essay, the AI's proposed share of the question's value (share 0..1; correct when it is 1) with feedback; for an assignment, the unreleased draft. Suggestions are never visible to the student; the teacher confirms each one with grade_quiz_essay or grade_assignment.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"description":"Default submitted (pending).","type":"string","enum":["submitted","graded","all"]},"course_id":{"type":"string","format":"uuid","description":"Only this course (UUID)."},"query":{"description":"Student name or email.","type":"string","maxLength":120},"page":{"type":"integer","minimum":1,"maximum":9007199254740991},"page_size":{"description":"Default 20.","type":"integer","minimum":1,"maximum":50}}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_assignment_submission":{"post":{"operationId":"get_assignment_submission","summary":"Ver una entrega","description":"One assignment delivery or quiz essay answer in full: the student's text and page answers, a temporary download link for an attached file, the current grade and ai_suggestion (see list_assignment_submissions).","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"submission_id":{"type":"string","format":"uuid","description":"Submission id from list_assignment_submissions (UUID)."}},"required":["submission_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/list_live_classes":{"post":{"operationId":"list_live_classes","summary":"Clases en directo","description":"Live classes in a window (default: today and the next 14 days). Teachers see the classes of their courses, the academy-wide ones and the ones they host. `groups` narrows who sees a class (for a group class, the groups that see it) and `excluded_groups` never see it; get_live_class explains the full audience.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"description":"First day YYYY-MM-DD. Default today.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"days":{"description":"Window length. Default 14.","type":"integer","minimum":1,"maximum":120},"include_cancelled":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_live_class":{"post":{"operationId":"get_live_class","summary":"Detalle de una clase en directo","description":"One live class: who it is for (courses, groups, excluded groups and a `who_sees` sentence), where its recording is saved and whether it is ready (`recording`), its materials, and its attendance (who joined, when and for how long).","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"live_class_id":{"type":"string","format":"uuid","description":"Live class id (UUID)."}},"required":["live_class_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/list_groups":{"post":{"operationId":"list_groups","summary":"Grupos de alumnos","description":"Student groups. A group does not have to enroll anyone: `enrolls_in` lists the courses its members are enrolled in automatically (often none). `teachers` are the instructors who see that group's message channels, can create and archive them, post in Community for those students and message them. Admins still see every channel. Groups also narrow live classes (see get_live_class), community posts and lesson visibility: `only_lessons` are lessons only members of groups that reserve them see; `hidden_lessons` are lessons (with their sub-lessons) its members never see, e.g. the solucionarios of a «Libre» group. Pass group_id for the lesson list. Use the ids to filter find_students, change membership, assign teachers, or create a group channel. Admins create a group with create_student_group and edit it with update_student_group. With group_id it also returns `release` (courses where the group has its own opening dates: open = everything open, custom = its own schedule) and `systeme_access_group_for` (courses where systeme.io uses the group to grant access, `kind` `level` or `drip`; the group cannot enroll in those). For one course in detail use get_group_course_access.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"group_id":{"type":"string","format":"uuid","description":"Group id, to list its lesson rules (UUID)."}}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_group_course_access":{"post":{"operationId":"get_group_course_access","summary":"Accesos de un grupo en un curso","description":"How one group sees one course: each module and lesson with its id, whether members see it, and when it opens. This is the Grupos → group → Accesos por curso screen. Admins only. Its ids are the ones update_student_group asks for (lesson rules and release). `systeme_access_group` is `level` or `drip` when systeme.io uses the group for this course, otherwise null. Read this before changing a group's access. list_groups with group_id is the shorter list of every course.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"admin","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"group_id":{"type":"string","format":"uuid","description":"Group id (UUID)."},"course_id":{"type":"string","format":"uuid","description":"Course id (UUID)."}},"required":["group_id","course_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_ai_usage":{"post":{"operationId":"get_ai_usage","summary":"Uso de IA","description":"What the academy spent on AI in a period, in euros, matching Uso de IA: course assistant, video chapter generation, AI images past the included generations, and AI grading, plus the included credit left on the assistant and on grading. Admin only. Default window is the last 30 days, not the calendar month: pass from and to (YYYY-MM-DD) for a month. Amounts already include the platform margin. unpriced counts calls with no rate and are not zero. Chapter spend is billed with the assistant (same included credit and card). Image generations inside the included count are free and are not in images.eur; each one past that count is billed on the same card at 10% over the list price, with no euro grant. Grading has its own included credit. credit.spent_eur is everything so far, not this window. A complimentary academy shows the cost and is not invoiced. This is the whole academy, not the connected person.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"admin","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"range":{"description":"Preset window for activity figures. Default 30d.","type":"string","enum":["7d","30d","90d","365d","all"]},"from":{"description":"First day, inclusive. Overrides `range`.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"description":"Last day, inclusive. Overrides `range`.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_tutor_usage":{"post":{"operationId":"get_tutor_usage","summary":"Uso del Profesor IA","description":"How students use the academy's AI tutor (Profesor IA), matching the Profesor IA block in Métricas: questions, conversations and students who used it in the last 30 days and since the start, estimated hours saved, the course material students ask about most, and a written summary of trending topics. The window is fixed at the last 30 days up to updated_at; there is no custom range. For one student's AI profile use get_student_tutor_profile; for AI spend in euros use get_ai_usage.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_student_tutor_profile":{"post":{"operationId":"get_student_tutor_profile","summary":"Perfil de un alumno en el Profesor IA","description":"What the academy's AI tutor (Profesor IA) has learned about one student from the questions they asked it, matching the Profesor IA section of the student record: a written profile (strengths, difficulties, how they study), questions asked (total and last 30 days), conversations, quizzes taken with the tutor and resources it generated for them. Personal data: admins see any student; an instructor only students enrolled in a course they are assigned to. Never returns the conversations themselves. For courses, progress and quiz scores use get_student.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"student_id":{"type":"string","format":"uuid","description":"Student user id (UUID)."},"email":{"description":"Student email, instead of student_id.","type":"string","format":"email"}}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_quiz_results":{"post":{"operationId":"get_quiz_results","summary":"Notas de los tests","description":"Quiz scores in one course. With only course_id: one row per quiz (attempts, students, pass rate, average and median best score) plus quizzes nobody has taken. With quiz_id: that quiz's score bands and every student's best, first and last score and attempts, plus who has access but has not taken it. With student_id or email: that student's results on every quiz next to the course average. Students only; staff attempts are left out. Default window is all time. For the questions they get wrong, use get_quiz_insights.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"course_id":{"type":"string","format":"uuid","description":"Course id (UUID)."},"quiz_id":{"type":"string","format":"uuid","description":"Only this quiz (the quiz_id from a previous call) (UUID)."},"student_id":{"type":"string","format":"uuid","description":"Only this student (UUID)."},"email":{"description":"Only this student, by email.","type":"string","format":"email"},"limit":{"description":"Max students listed. Default 100.","type":"integer","minimum":1,"maximum":500},"range":{"description":"Preset window for attempts. Default all.","type":"string","enum":["7d","30d","90d","365d","all"]},"from":{"description":"First day, inclusive. Overrides `range`.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"description":"Last day, inclusive. Overrides `range`.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["course_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_course_ranking":{"post":{"operationId":"get_course_ranking","summary":"Ranking del curso","description":"The leaderboard students see on the course ranking page: the course board (average best score over the course quizzes, or the academy's custom final-grade formula) or one quiz board. Lists the boards available and the top 50 of the one asked for, with ties sharing a place. Returns ranking_enabled=false when the course shows no ranking; get_quiz_results still works then.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"course_id":{"type":"string","format":"uuid","description":"Course id (UUID)."},"board":{"description":"\"course\" or a board id from a previous call. Default: the course board.","type":"string","maxLength":64}},"required":["course_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_sales_summary":{"post":{"operationId":"get_sales_summary","summary":"Altas y ventas","description":"Sign-ups and sales for a period, from the academy's payment integrations: movements by type, by channel and by course, a time series, the change against the period right before, new enrollments by how students got in (paid, CSV, invite, trial…), free trials and how many turned into a purchase, and webhooks that failed. activation = new subscription or purchase; renewal = a subscription renewed; payment = one-off payment; cancellation = subscription cancelled; refund = payment refunded. Admin only.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"admin","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"range":{"description":"Preset window for activity figures. Default 30d.","type":"string","enum":["7d","30d","90d","365d","all"]},"from":{"description":"First day, inclusive. Overrides `range`.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"description":"Last day, inclusive. Overrides `range`.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"course_id":{"type":"string","format":"uuid","description":"Only this course (UUID)."},"compare_previous":{"description":"Also compute the same-length period right before. Default true.","type":"boolean"}}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/list_sales_events":{"post":{"operationId":"list_sales_events","summary":"Detalle de altas y bajas","description":"Individual sales movements, newest first: who bought, renewed, cancelled or was refunded, through which channel and for which courses. Filter by type, channel, course and a name or email fragment. activation = new subscription or purchase; renewal = a subscription renewed; payment = one-off payment; cancellation = subscription cancelled; refund = payment refunded. Admin only.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"admin","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"range":{"description":"Preset window for activity figures. Default 30d.","type":"string","enum":["7d","30d","90d","365d","all"]},"from":{"description":"First day, inclusive. Overrides `range`.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"description":"Last day, inclusive. Overrides `range`.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"kinds":{"description":"Only these movement types.","maxItems":6,"type":"array","items":{"type":"string","enum":["activation","renewal","payment","cancellation","refund","other"]}},"channel":{"description":"Only this channel: pmpro, woocommerce, ghl or systeme.","type":"string","maxLength":32},"course_id":{"type":"string","format":"uuid","description":"Only movements for this course (UUID)."},"query":{"description":"Name or email fragment.","type":"string","maxLength":120},"limit":{"description":"Default 50.","type":"integer","minimum":1,"maximum":500}}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/list_billing_companies":{"post":{"operationId":"list_billing_companies","summary":"Empresas con las que factura la academia","description":"The companies the academy bills through in Pagos, primary first: for each, whether its Stripe account is connected and can take payments, whether automatic invoicing is on, which issuer details an invoice still needs, how many products, coupons, sales and invoices it has, and the link students use to manage their payments. Admin only. Use get_invoice_numbering for where each company's invoice numbering stands.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"admin","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_invoice_numbering":{"post":{"operationId":"get_invoice_numbering","summary":"Numeración de facturas","description":"Where the academy's invoice numbering stands this year, for each company it bills through: the next sale invoice number (F-YYYY-NNNN), the last number used, the same for corrective invoices (R-), and whether automatic invoicing is on. Admin only. Use set_next_invoice_number to continue a numbering started in other software.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"admin","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/set_next_invoice_number":{"post":{"operationId":"set_next_invoice_number","summary":"Cambiar el número de la próxima factura","description":"Set the number a company's next sale invoice takes this year, e.g. 101 makes the next one F-YYYY-0101. For academies that already invoiced this year with other software. Admin only. Only forward: numbers already used this year are refused. When the academy bills through more than one company, pass account_id from get_invoice_numbering. Always call with dry_run first, show the teacher the resulting invoice number, and save only after they confirm. Idempotent. Does not renumber invoices already issued and does not touch corrective invoices (R-).","tags":["settings:write"],"x-scope":"settings:write","x-min-role":"admin","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"next_number":{"type":"integer","minimum":1,"maximum":999999,"description":"Number of the next sale invoice, e.g. 101 for F-YYYY-0101."},"account_id":{"type":"string","format":"uuid","description":"Company id from get_invoice_numbering. Required when the academy has more than one. (UUID)."},"dry_run":{"description":"Preview only. Call this first and confirm with the teacher.","type":"boolean"}},"required":["next_number"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/list_payment_offers":{"post":{"operationId":"list_payment_offers","summary":"Productos de Pagos","description":"The products the academy sells through Pagos (its own Stripe), newest first: price in cents with VAT, how it bills, the courses it gives, whether it is on sale, hidden from course pages, its maximum of sales, how many it has sold and how many are left, and the Stripe payment link. Admin only. Use set_offer_availability to hide a product or change its maximum. For sales over time use get_sales_summary.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"admin","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/set_offer_availability":{"post":{"operationId":"set_offer_availability","summary":"Ocultar un producto o limitar sus ventas","description":"Hide a Pagos product from course pages (it then sells only through its payment link, e.g. to offer it to a few people) and/or set its maximum of sales, as «Disponibilidad» does in Pagos. Admin only. Omit a field to keep it as it is; max_sales null lifts the cap. The cap is a total, not per person, cannot go below the sales already made, and equal to them closes the link now. Raising it on a sold-out product opens the link again. Always call with dry_run first, tell the teacher what will change, and save only after they confirm. Idempotent.","tags":["settings:write"],"x-scope":"settings:write","x-min-role":"admin","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"offer_id":{"type":"string","format":"uuid","description":"Product id from list_payment_offers (UUID)."},"hidden":{"description":"true: off course pages, sold only through the payment link.","type":"boolean"},"max_sales":{"description":"Total sales allowed. null lifts the cap. Omit to keep the current one.","anyOf":[{"type":"integer","minimum":1,"maximum":100000},{"type":"null"}]},"dry_run":{"description":"Preview only. Call this first and confirm with the teacher.","type":"boolean"}},"required":["offer_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_student_fields":{"post":{"operationId":"get_student_fields","summary":"Datos internos de los alumnos","description":"The academy's internal student fields (phone, exam sitting, status… whatever the academy defined under Alumnos → Campos del alumno), filled in by staff and never shown to students. With student_id or email: every field of that student (null = not filled in), who last edited them, and the student's own intake-questionnaire answers when the academy uses one. Without a student: students that have values, optionally only those whose `field` (id or label) is filled or contains `value_contains` (case and accents ignored, compared with the text shown, e.g. the option label). Use get_student for progress and quizzes.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"admin","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"student_id":{"type":"string","format":"uuid","description":"Student user id (UUID)."},"email":{"description":"Student email, instead of student_id.","type":"string","format":"email"},"field":{"description":"List mode: field id or label to filter on.","type":"string","maxLength":120},"value_contains":{"description":"List mode: keep students whose value contains this text.","type":"string","maxLength":200},"limit":{"description":"List mode. Default 100.","type":"integer","minimum":1,"maximum":500}}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/invite_students":{"post":{"operationId":"invite_students","summary":"Dar de alta alumnos","description":"Add students to the academy by email (new or existing accounts), optionally giving them access to courses and adding them to groups, and optionally emailing them an invitation to set their password. Call with dry_run first and confirm with the teacher.","tags":["students:write"],"x-scope":"students:write","x-min-role":"instructor","x-kind":"write","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"emails":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string"}},"course_ids":{"maxItems":40,"type":"array","items":{"type":"string","format":"uuid"}},"group_ids":{"maxItems":40,"type":"array","items":{"type":"string","format":"uuid"}},"access_until":{"description":"Course access ends this day (YYYY-MM-DD). Omit for unlimited.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"send_invite":{"description":"Email an invitation. Default true.","type":"boolean"},"dry_run":{"description":"true = only report what would happen. Use it first for bulk changes and show the teacher.","type":"boolean"}},"required":["emails"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/enroll_students":{"post":{"operationId":"enroll_students","summary":"Dar acceso a un curso","description":"Give existing students access to one course, optionally until a date. For people not yet in the academy use invite_students. Use dry_run for more than a few students.","tags":["students:write"],"x-scope":"students:write","x-min-role":"instructor","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"course_id":{"type":"string","format":"uuid","description":"Course id (UUID)."},"students":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"student_id":{"type":"string","format":"uuid","description":"Student user id (UUID)."},"email":{"type":"string","format":"email"}}}},"access_until":{"description":"Access ends this day (YYYY-MM-DD). Omit for unlimited.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"dry_run":{"description":"true = only report what would happen. Use it first for bulk changes and show the teacher.","type":"boolean"}},"required":["course_id","students"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/unenroll_student":{"post":{"operationId":"unenroll_student","summary":"Quitar acceso a un curso","description":"Remove one student's access to one course. Their progress is kept and comes back if they are enrolled again. Confirm with the teacher first.","tags":["students:write"],"x-scope":"students:write","x-min-role":"instructor","x-kind":"destructive","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"course_id":{"type":"string","format":"uuid","description":"Course id (UUID)."},"student":{"type":"object","properties":{"student_id":{"type":"string","format":"uuid","description":"Student user id (UUID)."},"email":{"type":"string","format":"email"}}}},"required":["course_id","student"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/set_access_until":{"post":{"operationId":"set_access_until","summary":"Cambiar fin de acceso","description":"Change the day a student's access to a course ends, or remove the limit with access_until null. The student must already be enrolled.","tags":["students:write"],"x-scope":"students:write","x-min-role":"instructor","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"course_id":{"type":"string","format":"uuid","description":"Course id (UUID)."},"student":{"type":"object","properties":{"student_id":{"type":"string","format":"uuid","description":"Student user id (UUID)."},"email":{"type":"string","format":"email"}}},"access_until":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}],"description":"YYYY-MM-DD, or null for unlimited."}},"required":["course_id","student","access_until"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/set_extra_access":{"post":{"operationId":"set_extra_access","summary":"Dar o quitar el contenido extra","description":"Give (extra_access: true) or take away (false) a student's access to a course's extra content modules. The student must be enrolled. Giving access fails when the course has no extra modules. Repeating the call changes nothing.","tags":["students:write"],"x-scope":"students:write","x-min-role":"instructor","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"course_id":{"type":"string","format":"uuid","description":"Course id (UUID)."},"student":{"type":"object","properties":{"student_id":{"type":"string","format":"uuid","description":"Student user id (UUID)."},"email":{"type":"string","format":"email"}}},"extra_access":{"type":"boolean"}},"required":["course_id","student","extra_access"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/resend_invite":{"post":{"operationId":"resend_invite","summary":"Reenviar invitación","description":"Email a student a fresh link to set their password and enter the campus.","tags":["students:write"],"x-scope":"students:write","x-min-role":"instructor","x-kind":"write","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"student":{"type":"object","properties":{"student_id":{"type":"string","format":"uuid","description":"Student user id (UUID)."},"email":{"type":"string","format":"email"}}}},"required":["student"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/set_group_membership":{"post":{"operationId":"set_group_membership","summary":"Añadir o quitar de un grupo","description":"Add students to a group or remove them. A teacher can only change a group assigned to them; an admin can change any group. A student can be in several groups. Joining enrolls them in the group's `enrolls_in` courses, if any; it also changes which live classes and lessons they see when the academy narrows those by group. Use list_groups for the ids.","tags":["students:write"],"x-scope":"students:write","x-min-role":"instructor","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"group_id":{"type":"string","format":"uuid","description":"Group id (UUID)."},"students":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"student_id":{"type":"string","format":"uuid","description":"Student user id (UUID)."},"email":{"type":"string","format":"email"}}}},"member":{"type":"boolean","description":"true = add to the group, false = remove."},"dry_run":{"description":"true = only report what would happen. Use it first for bulk changes and show the teacher.","type":"boolean"}},"required":["group_id","students","member"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/create_group":{"post":{"operationId":"create_group","summary":"Crear un grupo","description":"Create an empty student group, the same as Grupos → Crear grupo. Admin only. It does not enroll anyone and does not change which lessons they see. Add students afterwards with set_group_membership. If that name already exists, returns the existing group and creates nothing. Confirm the name with the teacher first. To set the courses it enrolls, its lesson rules or its opening dates use update_student_group; to delete it, delete_student_group.","tags":["students:write"],"x-scope":"students:write","x-min-role":"admin","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200}},"required":["name"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/set_group_instructors":{"post":{"operationId":"set_group_instructors","summary":"Asignar profesores a un grupo","description":"Replace the staff of one student group. Each person has two jobs there: corrects (grades the submissions of the group's students when their correction scope is 'their groups') and answers_messages (the group's students can message them privately). A job left out keeps what the person already has in the group; newcomers get both. Someone with both jobs false is left out. Either job lets them see the group's message channels, create and archive them, post in Community for its students and change its members. Admins still see every channel. Pass the full list; an empty list clears the group's staff. Always call with dry_run first, show the names and jobs, and save only after the teacher confirms. Use list_groups for the group id and get_member_access for one person's groups. This does not enroll anyone or change lesson rules.","tags":["students:write"],"x-scope":"students:write","x-min-role":"admin","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"group_id":{"type":"string","format":"uuid","description":"Group id (UUID)."},"teachers":{"maxItems":40,"type":"array","items":{"type":"object","properties":{"teacher_id":{"type":"string","format":"uuid","description":"Teacher user id (UUID)."},"email":{"type":"string","format":"email"},"corrects":{"description":"Grades this group's submissions. Omit to keep what they have; newcomers get true.","type":"boolean"},"answers_messages":{"description":"This group's students can message them privately. Omit to keep; newcomers get true.","type":"boolean"}}}},"dry_run":{"description":"true = only report what would happen. Use it first for bulk changes and show the teacher.","type":"boolean"}},"required":["group_id","teachers"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/create_student_group":{"post":{"operationId":"create_student_group","summary":"Crear un grupo de alumnos","description":"Create an empty student group. Then add students with set_group_membership and, if the teacher wants, set its courses and lesson rules with update_student_group. Names are unique in the academy. Same as create_group, which returns the existing group when the name is taken.","tags":["students:write"],"x-scope":"students:write","x-min-role":"admin","x-kind":"write","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120}},"required":["name"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/update_student_group":{"post":{"operationId":"update_student_group","summary":"Editar un grupo de alumnos","description":"Rename a group, change the courses its members are enrolled in automatically (enrolls_in_course_ids), or which lessons are reserved for it (only_lesson_ids) or hidden from it (hidden_lesson_ids). Each list you send replaces that list; what you leave out stays. A course added enrolls every member; a course removed takes it away from members who only had it through this group. Members are changed with set_group_membership. Read list_groups with group_id first and confirm with the teacher. The add_* lists and clear_lesson_ids change single lessons without resending the rest. release changes when content opens for the group, one entry per course: course (like the course itself), open (everything open) or custom with target, mode and items for every module or lesson of the course (value is YYYY-MM-DD when mode is calendar, or days from 0 to 3650 when mode is enrollment). Read get_group_course_access first. A course listed in systeme_access_group_for cannot be added to enrolls_in_course_ids. access_level_course_ids lists the courses where this group is a purchase access level: there, hidden lessons open again for a member who holds the course's full access or another level that includes them. Elsewhere hiding is final.","tags":["students:write"],"x-scope":"students:write","x-min-role":"admin","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"group_id":{"type":"string","format":"uuid","description":"Group id (UUID)."},"name":{"type":"string","minLength":1,"maxLength":120},"enrolls_in_course_ids":{"maxItems":100,"type":"array","items":{"type":"string","format":"uuid"}},"only_lesson_ids":{"maxItems":500,"type":"array","items":{"type":"string","format":"uuid"}},"hidden_lesson_ids":{"maxItems":500,"type":"array","items":{"type":"string","format":"uuid"}},"add_only_lesson_ids":{"maxItems":500,"type":"array","items":{"type":"string","format":"uuid"}},"add_hidden_lesson_ids":{"maxItems":500,"type":"array","items":{"type":"string","format":"uuid"}},"clear_lesson_ids":{"maxItems":500,"type":"array","items":{"type":"string","format":"uuid"}},"access_level_course_ids":{"maxItems":100,"type":"array","items":{"type":"string","format":"uuid"}},"release":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"course_id":{"type":"string","format":"uuid","description":"Course id (UUID)."},"policy":{"type":"string","enum":["course","open","custom"]},"target":{"type":"string","enum":["modules","lessons"]},"mode":{"type":"string","enum":["calendar","enrollment"]},"items":{"maxItems":2000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"value":{"type":"string","maxLength":16}},"required":["id","value"]}}},"required":["course_id","policy"]}}},"required":["group_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/delete_student_group":{"post":{"operationId":"delete_student_group","summary":"Borrar un grupo de alumnos","description":"Delete a student group. Its members stay in the academy, but lose the courses they only had through this group, the lessons reserved for it, and live classes aimed at it. The group is removed from every live class: upcoming_live_classes.hidden_from_everyone are group classes no student will see, open_to_whole_course are course classes every course student will see. To rename a group, use update_student_group instead. Call with dry_run first, show the teacher what would change and confirm.","tags":["students:write"],"x-scope":"students:write","x-min-role":"admin","x-kind":"destructive","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"group_id":{"type":"string","format":"uuid","description":"Group id (UUID)."},"dry_run":{"description":"true = only report what would happen.","type":"boolean"}},"required":["group_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/set_student_fields":{"post":{"operationId":"set_student_fields","summary":"Rellenar campos de la ficha","description":"Fill in or clear the academy's staff fields on one student's record (get_student_fields lists them with their choices). Only the fields you send change; value null clears one. Choices can be given by their label. Students never see these fields.","tags":["students:write"],"x-scope":"students:write","x-min-role":"instructor","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"student":{"type":"object","properties":{"student_id":{"type":"string","format":"uuid","description":"Student user id (UUID)."},"email":{"type":"string","format":"email"}}},"values":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":200,"description":"field_id or the field's label."},"value":{"anyOf":[{"anyOf":[{"type":"string","maxLength":4000},{"type":"number"},{"type":"boolean"},{"maxItems":50,"type":"array","items":{"type":"string","maxLength":500}}]},{"type":"null"}]}},"required":["field","value"]}}},"required":["student","values"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/set_mentorship_credits":{"post":{"operationId":"set_mentorship_credits","summary":"Cambiar las mentorías 1:1 disponibles","description":"Set how many 1:1 mentorship sessions a student has left (0 to 999). It replaces the number; to add some, read the current one first and send the sum. Each 1:1 live class scheduled for the student uses one.","tags":["students:write"],"x-scope":"students:write","x-min-role":"instructor","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"student":{"type":"object","properties":{"student_id":{"type":"string","format":"uuid","description":"Student user id (UUID)."},"email":{"type":"string","format":"email"}}},"credits":{"type":"integer","minimum":0,"maximum":999}},"required":["student","credits"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/start_ai_correction":{"post":{"operationId":"start_ai_correction","summary":"Corregir una entrega con IA","description":"Ask the AI to correct an assignment delivery (source assignment in list_assignment_submissions) whose assignment has AI correction on. It takes a few minutes: then call get_ai_correction with the job_id. The result is a draft the student does not see until the teacher grades with grade_assignment.","tags":["grading:write"],"x-scope":"grading:write","x-min-role":"instructor","x-kind":"write","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"submission_id":{"type":"string","format":"uuid","description":"Submission id (UUID)."}},"required":["submission_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_ai_correction":{"post":{"operationId":"get_ai_correction","summary":"Ver la corrección con IA","description":"How an AI correction started with start_ai_correction is going. When status is ready it returns the proposed score and feedback, saved as the delivery's unreleased draft (ai_suggestion in get_assignment_submission). Show it to the teacher; grade only after they approve.","tags":["grading:write"],"x-scope":"grading:write","x-min-role":"instructor","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"job_id":{"type":"string","format":"uuid","description":"Job id from start_ai_correction (UUID)."}},"required":["job_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_email_problems":{"post":{"operationId":"get_email_problems","summary":"Quién no recibe los correos","description":"Students and staff of the academy whose email address we cannot write to, newest problem first: name, email, role, why (`cause`) and since when. Nothing is sent to these addresses (invitations, reminders, notices) until the address is fixed. Use it when a teacher says someone 'never got the email' or asks who is not receiving mail. cause: no_mailbox = the receiving server says the address does not exist, usually a typo; rejected = their server refuses our mail; complaint = they marked one of our emails as spam; blocked = it bounced or complained earlier and the original reason was not kept.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"who":{"description":"Whose addresses to check. Default all.","type":"string","enum":["students","staff","all"]},"limit":{"description":"People to list. Default 100.","type":"integer","minimum":1,"maximum":500}}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/send_announcement":{"post":{"operationId":"send_announcement","summary":"Enviar un aviso","description":"Send a notice to students: everyone, the students of one course, or a list of students. It appears in their campus notifications and, if chosen, by email and push. Always call with dry_run first, show the teacher the text and the number of recipients, and send only after they confirm.","tags":["messages:write"],"x-scope":"messages:write","x-min-role":"instructor","x-kind":"write","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":80},"body":{"type":"string","minLength":1,"maxLength":5000},"audience":{"type":"string","enum":["all_students","course","students"]},"course_id":{"type":"string","format":"uuid","description":"Course id, when audience is course (UUID)."},"student_ids":{"description":"When audience is students.","maxItems":2000,"type":"array","items":{"type":"string","format":"uuid"}},"link":{"description":"Campus path students open when they tap the notice, e.g. /learn/<academy>/courses/<slug>.","type":"string","maxLength":500,"pattern":"^\\/"},"email":{"description":"Also send by email. Default true.","type":"boolean"},"push":{"description":"Also send a push notification. Default true.","type":"boolean"},"dry_run":{"type":"boolean"}},"required":["title","body","audience"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/send_direct_message":{"post":{"operationId":"send_direct_message","summary":"Mensaje privado a un alumno","description":"Write to one student in their private chat in the campus, as the teacher. Show the teacher the text and send only after they confirm. Teachers can write to students of the courses they teach.","tags":["messages:write"],"x-scope":"messages:write","x-min-role":"instructor","x-kind":"write","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"student_id":{"type":"string","format":"uuid","description":"Student user id (UUID)."},"body":{"type":"string","minLength":1,"maxLength":4000}},"required":["student_id","body"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/grade_assignment":{"post":{"operationId":"grade_assignment","summary":"Calificar una entrega","description":"Grade an assignment delivery (source assignment in list_assignment_submissions) with a score and written feedback. The student is notified. Propose the grade and feedback to the teacher and grade only after they approve.","tags":["grading:write"],"x-scope":"grading:write","x-min-role":"instructor","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"submission_id":{"type":"string","format":"uuid","description":"Submission id (UUID)."},"score":{"anyOf":[{"type":"number","minimum":0,"maximum":1000},{"type":"null"}],"description":"Points, up to the assignment's max_score. null = feedback only."},"feedback":{"type":"string","maxLength":5000}},"required":["submission_id","score"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/grade_quiz_essay":{"post":{"operationId":"grade_quiz_essay","summary":"Corregir una respuesta de desarrollo","description":"Mark an open answer in a quiz (source quiz_essay in list_assignment_submissions) as correct or incorrect, with feedback. The attempt's score is recalculated. Propose it to the teacher first.","tags":["grading:write"],"x-scope":"grading:write","x-min-role":"instructor","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"submission_id":{"type":"string","format":"uuid","description":"The quiz_essay submission id (UUID)."},"correct":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"true = correct, false = incorrect, null = back to pending."},"feedback":{"type":"string","maxLength":5000}},"required":["submission_id","correct"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/schedule_live_class":{"post":{"operationId":"schedule_live_class","summary":"Programar una clase en directo","description":"Schedule a live class for the students of one or more courses, of student groups, or for one student. Course and group classes can be narrowed: a course class with group_ids is only for the course students in those groups (e.g. a USA or Europe time slot); a group class with course_ids is only for group members enrolled in one of those courses; members of excluded_group_ids never see it, even when another of their groups is listed, so only exclude a group none of whose members should see the class (e.g. a group that attends no live classes). With platform google_meet or zoom and the academy's integration connected, the meeting link is created automatically; otherwise pass meeting_url. `recording` says where the recording goes (default: not kept); for a lesson, take module and lesson ids from get_course_outline. Students get the usual reminders. Confirm date, time, timezone, who sees it and where the recording goes with the teacher first.","tags":["live:write"],"x-scope":"live:write","x-min-role":"instructor","x-kind":"write","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":2,"maxLength":200},"description":{"type":"string","maxLength":5000},"starts_at":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?(Z|[+-]\\d{2}:\\d{2})$","description":"Start, ISO 8601 with offset."},"duration_minutes":{"description":"Default 60.","type":"integer","minimum":5,"maximum":1440},"timezone":{"description":"IANA zone for reminders, e.g. Europe/Madrid. Default Europe/Madrid.","type":"string","maxLength":64},"audience":{"type":"string","enum":["course","group","student"]},"course_ids":{"description":"Course audience: the courses. Group audience: optional, only members enrolled in one of them.","maxItems":40,"type":"array","items":{"type":"string","format":"uuid"}},"group_ids":{"description":"Group audience: the groups. Course audience: optional, only course students in one of them.","maxItems":40,"type":"array","items":{"type":"string","format":"uuid"}},"excluded_group_ids":{"description":"Members of these groups never see the class.","maxItems":40,"type":"array","items":{"type":"string","format":"uuid"}},"student_id":{"type":"string","format":"uuid"},"platform":{"description":"Default google_meet. Meet, Zoom and Teams create the meeting when the academy connected them in Integraciones (Teams: Microsoft Teams); otherwise pass meeting_url.","type":"string","enum":["google_meet","zoom","teams","other"]},"meeting_url":{"description":"Existing meeting link. Skips automatic creation.","type":"string","format":"uri"},"repeat_weekly_until":{"description":"Repeat every week until this day.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"recording":{"type":"object","properties":{"save":{"type":"string","enum":["none","provider_only","my_classes","course_lesson"],"description":"none = do not keep it; provider_only = upload to the academy's video destination only (Vídeos, Bunny or Vimeo); my_classes = the students' «Mis clases» (1:1: their private course); course_lesson = a lesson in a course module."},"course_id":{"type":"string","format":"uuid","description":"course_lesson: course that gets the lesson. Default: the class's course (UUID)."},"module_id":{"type":"string","format":"uuid","description":"course_lesson: module for the lesson (ids from get_course_outline) (UUID)."},"lesson_title":{"description":"course_lesson: title of the new lesson. Default: the class title.","type":"string","minLength":1,"maxLength":160},"lesson_id":{"type":"string","format":"uuid","description":"course_lesson: append the recording to this existing lesson instead of creating one (UUID)."},"only_class_audience":{"description":"course_lesson, new lesson: true (default) = only the students who see the class see the lesson (its included groups; its excluded groups never do); false = every student of the course.","type":"boolean"}},"required":["save"],"description":"«Dónde guardar la grabación». Meet, Zoom or Teams recordings (of meetings the academy created) are fetched after the class and uploaded to the academy's Vídeos library, or its own Bunny or Vimeo. A new lesson is created when the recording arrives, not when the class is scheduled."}},"required":["title","starts_at","audience"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/cancel_live_class":{"post":{"operationId":"cancel_live_class","summary":"Cancelar una clase en directo","description":"Cancel a live class. For a weekly series choose this one, this and the following, or all. Students are told it is cancelled. Confirm with the teacher first.","tags":["live:write"],"x-scope":"live:write","x-min-role":"instructor","x-kind":"destructive","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"live_class_id":{"type":"string","format":"uuid","description":"Live class id (UUID)."},"scope":{"description":"For recurring classes. Default this.","type":"string","enum":["this","following","all"]}},"required":["live_class_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/update_live_class":{"post":{"operationId":"update_live_class","summary":"Cambiar una clase en directo","description":"Change a scheduled live class: move it (starts_at, duration, timezone), rename it, change its link, host or who sees it, choose where its recording is saved (recording), or publish a recording link you already have (recording_url, e.g. a Vimeo, YouTube or Bunny URL). Who sees it can change completely, like the form's «Audiencia»: `audience` switches between course, group and student classes (e.g. a class for the group Europa Tarde becomes one for every student of the course Prueba: audience course, course_ids [Prueba]). Never cancel and recreate a class to change its audience. Only the fields you pass change; everything else stays as the class form has it. For a weekly series choose scope: this, following or all. Students get the usual updated reminders. The answer's `who_sees` is the form's «Verán esta clase» sentence. Confirm the change with the teacher first.","tags":["live:write"],"x-scope":"live:write","x-min-role":"instructor","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"live_class_id":{"type":"string","format":"uuid","description":"Live class id (UUID)."},"scope":{"description":"For recurring classes. Default this.","type":"string","enum":["this","following","all"]},"audience":{"description":"New audience type. Switching drops the groups the class was for unless you pass group_ids; course_ids carry over between course and group classes.","type":"string","enum":["course","group","student"]},"student_id":{"type":"string","format":"uuid","description":"Student user id, when audience becomes student (UUID)."},"title":{"type":"string","minLength":2,"maxLength":200},"description":{"type":"string","maxLength":5000},"starts_at":{"description":"New start, ISO 8601 with offset.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?(Z|[+-]\\d{2}:\\d{2})$"},"duration_minutes":{"type":"integer","minimum":5,"maximum":1440},"timezone":{"type":"string","maxLength":64},"meeting_url":{"description":"Use this link instead of creating the meeting automatically.","type":"string","format":"uri"},"host_id":{"anyOf":[{"type":"string","format":"uuid","description":"Staff user id of the new host (UUID)."},{"type":"null"}]},"course_ids":{"description":"Course class: the courses. Group class: narrowing courses.","maxItems":40,"type":"array","items":{"type":"string","format":"uuid"}},"group_ids":{"maxItems":40,"type":"array","items":{"type":"string","format":"uuid"}},"excluded_group_ids":{"maxItems":40,"type":"array","items":{"type":"string","format":"uuid"}},"recording":{"type":"object","properties":{"save":{"type":"string","enum":["none","provider_only","my_classes","course_lesson"],"description":"none = do not keep it; provider_only = upload to the academy's video destination only (Vídeos, Bunny or Vimeo); my_classes = the students' «Mis clases» (1:1: their private course); course_lesson = a lesson in a course module."},"course_id":{"type":"string","format":"uuid","description":"course_lesson: course that gets the lesson. Default: the class's course (UUID)."},"module_id":{"type":"string","format":"uuid","description":"course_lesson: module for the lesson (ids from get_course_outline) (UUID)."},"lesson_title":{"description":"course_lesson: title of the new lesson. Default: the class title.","type":"string","minLength":1,"maxLength":160},"lesson_id":{"type":"string","format":"uuid","description":"course_lesson: append the recording to this existing lesson instead of creating one (UUID)."},"only_class_audience":{"description":"course_lesson, new lesson: true (default) = only the students who see the class see the lesson (its included groups; its excluded groups never do); false = every student of the course.","type":"boolean"}},"required":["save"],"description":"«Dónde guardar la grabación». Meet, Zoom or Teams recordings (of meetings the academy created) are fetched after the class and uploaded to the academy's Vídeos library, or its own Bunny or Vimeo. A new lesson is created when the recording arrives, not when the class is scheduled."},"recording_url":{"description":"Recording link students see. null removes it.","anyOf":[{"type":"string","maxLength":2000,"format":"uri"},{"type":"null"}]},"recording_visible":{"description":"false hides the recording from students without deleting it.","type":"boolean"},"notify_when_ready":{"description":"Email students when the recording is ready.","type":"boolean"},"send_transcript":{"description":"Meet: transcript and Gemini notes in the after-class email.","type":"boolean"},"email_recording":{"description":"Meet: share the Drive recording link in that email.","type":"boolean"}},"required":["live_class_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/duplicate_live_class":{"post":{"operationId":"duplicate_live_class","summary":"Duplicar una clase en directo","description":"Copy a live class one week later, with the same audience, recording placement and reminders, titled «… (copia)». It has no meeting link yet: change the date, title or link afterwards with update_live_class. A 1:1 class uses one of the student's mentorship credits when the academy counts them.","tags":["live:write"],"x-scope":"live:write","x-min-role":"instructor","x-kind":"write","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"live_class_id":{"type":"string","format":"uuid","description":"Live class id (UUID)."}},"required":["live_class_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/delete_live_class":{"post":{"operationId":"delete_live_class","summary":"Borrar una clase en directo","description":"Delete a live class for good, with its attendance and materials; its Google Calendar event is removed. Students are not told: to tell them, use cancel_live_class instead. For a weekly series choose this, following or all. Only on the teacher's explicit request, after confirming.","tags":["live:write"],"x-scope":"live:write","x-min-role":"instructor","x-kind":"destructive","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"live_class_id":{"type":"string","format":"uuid","description":"Live class id (UUID)."},"scope":{"description":"For recurring classes. Default this.","type":"string","enum":["this","following","all"]}},"required":["live_class_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/add_live_class_material":{"post":{"operationId":"add_live_class_material","summary":"Añadir material a una clase","description":"Attach a link (slides, a PDF, a document) to a live class. Students see it according to the class's materials setting (always, while live, or after). Files cannot be uploaded from here; use a link.","tags":["live:write"],"x-scope":"live:write","x-min-role":"instructor","x-kind":"write","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"live_class_id":{"type":"string","format":"uuid","description":"Live class id (UUID)."},"title":{"type":"string","minLength":1,"maxLength":200},"url":{"type":"string","maxLength":2000,"format":"uri"}},"required":["live_class_id","title","url"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/remove_live_class_material":{"post":{"operationId":"remove_live_class_material","summary":"Quitar material de una clase","description":"Remove one material from a live class (material ids come from get_live_class). Confirm with the teacher first.","tags":["live:write"],"x-scope":"live:write","x-min-role":"instructor","x-kind":"destructive","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"live_class_id":{"type":"string","format":"uuid","description":"Live class id (UUID)."},"material_id":{"type":"string","format":"uuid","description":"Material id (UUID)."}},"required":["live_class_id","material_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/record_live_attendance":{"post":{"operationId":"record_live_attendance","summary":"Apuntar asistencia a mano","description":"Record that students attended a live class, with the minutes they were there, when no report can prove it (a class by phone, a Meet without the report). It is stored as manual attendance, apart from Zoom or Meet data. For Zoom classes prefer sync_live_attendance. Confirm the list with the teacher first.","tags":["live:write"],"x-scope":"live:write","x-min-role":"instructor","x-kind":"write","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"live_class_id":{"type":"string","format":"uuid","description":"Live class id (UUID)."},"attendees":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"student_id":{"type":"string","format":"uuid","description":"Student user id (UUID)."},"minutes":{"type":"integer","minimum":1,"maximum":600}},"required":["student_id","minutes"]}}},"required":["live_class_id","attendees"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/sync_live_attendance":{"post":{"operationId":"sync_live_attendance","summary":"Traer la asistencia de Zoom o Teams","description":"Fetch the provider's attendance report of a finished class now instead of waiting for the automatic sync: the Zoom participant report or the Microsoft Teams attendance report. Only for classes on Zoom or Teams whose meeting the academy created (a pasted link has no report we can read). Teams guests who joined without an account come back unmatched, with their name only.","tags":["live:write"],"x-scope":"live:write","x-min-role":"instructor","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"live_class_id":{"type":"string","format":"uuid","description":"Live class id (UUID)."}},"required":["live_class_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/resend_live_class_reminders":{"post":{"operationId":"resend_live_class_reminders","summary":"Reenviar el recordatorio de una clase","description":"Send the class reminder again now to everyone who sees the class, by email, in the campus, or both. Confirm with the teacher first.","tags":["live:write"],"x-scope":"live:write","x-min-role":"instructor","x-kind":"write","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"live_class_id":{"type":"string","format":"uuid","description":"Live class id (UUID)."},"channel":{"description":"Default: the class's own reminder setting.","type":"string","enum":["email","in_app","both"]}},"required":["live_class_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_tutoring_appointments":{"post":{"operationId":"get_tutoring_appointments","summary":"Ver citas con alumnos","description":"The connected teacher's bookable office hours and who has reserved them. Default range is the current Monday–Sunday in mainland Spain; pass from/to (YYYY-MM-DD) for another span, at most 92 days. Optional course_id or group_id keeps the schedules open to that course or group and the bookings made through it. Returns each open schedule (its courses and groups, weekday, clock times, minutes per appointment, channel) and the bookings in that range with the student name, email and, for a phone appointment, the number to call. Use this for «¿qué citas tengo?» or «¿quién ha reservado?». For a live class the teacher scheduled for a group, use list_live_classes instead.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"description":"First day, inclusive, YYYY-MM-DD.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"description":"Last day, inclusive, YYYY-MM-DD.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"course_id":{"type":"string","format":"uuid","description":"Only this course (UUID)."},"group_id":{"type":"string","format":"uuid","description":"Only this student group (UUID)."}}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/open_tutoring_window":{"post":{"operationId":"open_tutoring_window","summary":"Abrir horario de citas","description":"Open a weekly office-hour schedule for one or more courses and/or student groups the teacher teaches, so their students can book a call. Every student enrolled in any of the courses or in any of the groups sees the slots; pass at least one course_ids or group_ids entry. Hours are mainland Spain (Europe/Madrid). channel zoom or meet creates the Zoom or Google Meet meeting when a student books (that integration must already be connected); channel link reuses the teacher's own meeting_url for every appointment; channel phone asks the student for their number when booking and the teacher calls them. Always call with dry_run true first, tell the teacher the courses and groups, weekday, hours, minutes per appointment and channel, and save only after they confirm (dry_run false or omitted). Repeating the same schedule returns the existing one and does not open a second. An instructor can only open courses they are assigned to and groups they teach. This is not schedule_live_class: that creates one class, this opens bookable slices.","tags":["live:write"],"x-scope":"live:write","x-min-role":"instructor","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"course_ids":{"description":"Courses whose enrolled students can book.","maxItems":30,"type":"array","items":{"type":"string","format":"uuid"}},"group_ids":{"description":"Student groups whose members can book.","maxItems":30,"type":"array","items":{"type":"string","format":"uuid"}},"weekday":{"type":"integer","minimum":0,"maximum":6,"description":"0 Sunday … 6 Saturday, mainland Spain."},"start":{"type":"string","description":"Start time HH:MM, mainland Spain."},"end":{"type":"string","description":"End time HH:MM, mainland Spain. Must fit at least one appointment."},"slot_minutes":{"type":"integer","minimum":10,"maximum":120,"description":"Length of each bookable appointment, e.g. 20 or 30."},"channel":{"type":"string","enum":["zoom","meet","link","phone"]},"meeting_url":{"description":"The teacher's own meeting link. Required when channel is link.","type":"string","maxLength":500},"note":{"description":"Shown to the student.","type":"string","maxLength":500},"active_from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day the schedule can be booked, YYYY-MM-DD."},"active_until":{"description":"Last day, inclusive. Omit if it does not end.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"dry_run":{"description":"Preview only. Call this first and wait for the teacher to confirm.","type":"boolean"}},"required":["weekday","start","end","slot_minutes","channel","active_from"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/list_conversations":{"post":{"operationId":"list_conversations","summary":"Mensajes privados","description":"The teacher's private conversations in Messages, newest first: who, the last message (trimmed), when, and whether it is unread. Reading never marks anything as read. Use get_conversation for the messages and send_message to answer.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"unread_only":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/search_message_people":{"post":{"operationId":"search_message_people","summary":"Buscar a quién escribir","description":"People this staff member may start a direct message with, matched by name or email. Needs at least 2 letters. An admin or owner can reach anyone else in the academy. A teacher can reach other staff and the students of the courses and groups assigned to them, not the rest of the academy. Returns at most 20 people and says when that page may be incomplete. Does not open a chat: use send_direct_message with the user_id. Hidden when messaging is off.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","maxLength":80}},"required":["query"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_conversation":{"post":{"operationId":"get_conversation","summary":"Leer una conversación","description":"The latest messages of one private conversation (oldest first), with who wrote each. Use conversation_id from list_conversations. Reading does not mark it as read. Answer with send_message to the same student.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"conversation_id":{"type":"string","format":"uuid","description":"Conversation id (UUID)."}},"required":["conversation_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/list_community_posts":{"post":{"operationId":"list_community_posts","summary":"Publicaciones de la comunidad","description":"The latest posts in the academy community (pinned and newest first, 20 per page): text (trimmed), author, courses and groups it is for, likes, comments and poll question. Use get_community_post for the comments.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"before_post_id":{"type":"string","format":"uuid","description":"Last post of the previous page, to see older ones (UUID)."}}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_community_post":{"post":{"operationId":"get_community_post","summary":"Ver una publicación y sus comentarios","description":"One community post in full with all its comments (comment_id, author, text, which comment it answers). Use it before answering or moderating.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"post_id":{"type":"string","format":"uuid","description":"Post id (UUID)."}},"required":["post_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/post_in_community":{"post":{"operationId":"post_in_community","summary":"Publicar en la comunidad","description":"Publish a text post in the academy community for some courses and/or student groups (at least one). Those students are notified. Show the teacher the exact text and audience and post only after they approve.","tags":["messages:write"],"x-scope":"messages:write","x-min-role":"instructor","x-kind":"write","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":5000},"course_ids":{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid"}},"group_ids":{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid"}},"pin":{"description":"true = pin it to the top of the community.","type":"boolean"}},"required":["text"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/comment_in_community":{"post":{"operationId":"comment_in_community","summary":"Comentar en la comunidad","description":"Comment on a community post, or answer one comment with reply_to_comment_id. The post's author and the people in the thread are notified. Show the teacher the text first.","tags":["messages:write"],"x-scope":"messages:write","x-min-role":"instructor","x-kind":"write","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"post_id":{"type":"string","format":"uuid","description":"Post id (UUID)."},"text":{"type":"string","minLength":1,"maxLength":3000},"reply_to_comment_id":{"type":"string","format":"uuid","description":"Comment being answered (UUID)."}},"required":["post_id","text"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/pin_community_post":{"post":{"operationId":"pin_community_post","summary":"Fijar o soltar una publicación","description":"Pin a community post to the top (pinned: true) or unpin it. Repeating the call changes nothing.","tags":["messages:write"],"x-scope":"messages:write","x-min-role":"instructor","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"post_id":{"type":"string","format":"uuid","description":"Post id (UUID)."},"pinned":{"type":"boolean"}},"required":["post_id","pinned"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/delete_community_post":{"post":{"operationId":"delete_community_post","summary":"Borrar una publicación","description":"Remove a community post, with its comments, for everyone. Staff may remove any student's post. Confirm with the teacher first.","tags":["messages:write"],"x-scope":"messages:write","x-min-role":"instructor","x-kind":"destructive","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"post_id":{"type":"string","format":"uuid","description":"Post id (UUID)."}},"required":["post_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/delete_community_comment":{"post":{"operationId":"delete_community_comment","summary":"Borrar un comentario","description":"Remove a community comment and the replies under it, for everyone. Staff may remove any student's comment. Confirm with the teacher first.","tags":["messages:write"],"x-scope":"messages:write","x-min-role":"instructor","x-kind":"destructive","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"comment_id":{"type":"string","format":"uuid","description":"Comment id (UUID)."}},"required":["comment_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/list_support_tickets":{"post":{"operationId":"list_support_tickets","summary":"Solicitudes de ayuda","description":"Students' help requests from the campus (Ayuda): open first, then oldest first. Each has the kind, subject, the student's text, the course, the status (open, acknowledged = someone is on it, resolved) and the answer if resolved. Default: open and acknowledged.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"statuses":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["open","acknowledged","resolved"]}}}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/acknowledge_support_ticket":{"post":{"operationId":"acknowledge_support_ticket","summary":"Marcar una solicitud como en curso","description":"Mark an open help request as being handled, which records when the academy first replied. Only works on open requests; repeating it changes nothing.","tags":["messages:write"],"x-scope":"messages:write","x-min-role":"instructor","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"ticket_id":{"type":"string","format":"uuid","description":"Ticket id (UUID)."}},"required":["ticket_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/resolve_support_ticket":{"post":{"operationId":"resolve_support_ticket","summary":"Resolver una solicitud de ayuda","description":"Close a help request with the answer the student reads in Ayuda. Show the teacher the answer first and resolve only after they approve.","tags":["messages:write"],"x-scope":"messages:write","x-min-role":"instructor","x-kind":"write","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"ticket_id":{"type":"string","format":"uuid","description":"Ticket id (UUID)."},"answer":{"type":"string","minLength":3,"maxLength":4000}},"required":["ticket_id","answer"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/list_team":{"post":{"operationId":"list_team","summary":"Equipo de la academia","description":"The academy's staff: name, email, role (owner, admin, instructor), custom_role (the name of the custom role that narrows what they see in the panel, or null for the whole of their level) and since when. Students are not listed. For what each custom role opens use list_staff_roles.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_member_access":{"post":{"operationId":"get_member_access","summary":"Qué hace cada persona del equipo","description":"What each staff member does in the academy, as set on their page under Equipo: which submissions they may grade (grading_scope), the courses they edit, and in each student group whether they correct and/or answer messages. Give email for one person; leave it out for the whole team (teachers, admins and owners). A warning says when a teacher's setting lets them see no submission at all. To change it use set_member_access; for roles and custom roles use list_team and list_staff_roles.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"admin","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"description":"One staff member; omit for everyone.","type":"string","format":"email"}}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/set_member_access":{"post":{"operationId":"set_member_access","summary":"Cambiar qué hace alguien del equipo","description":"Change what one staff member does, as on their page under Equipo: grading_scope (teachers only; admins and owners always grade everything), the courses they edit, and their jobs in student groups. Each field you leave out stays as it is; course_ids and groups, when given, are the complete new lists (an empty list clears them). Read get_member_access first. Always call with dry_run first, show the teacher the before and after, and save only after they confirm. Admins only.","tags":["settings:write"],"x-scope":"settings:write","x-min-role":"admin","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"grading_scope":{"description":"groups = solo sus grupos, courses = solo sus cursos, academy = toda la academia.","type":"string","enum":["groups","courses","academy"]},"course_ids":{"description":"Every course they should edit. Omit to keep their courses.","maxItems":500,"type":"array","items":{"type":"string","format":"uuid","description":"Course id (UUID)."}},"groups":{"description":"Every group where they have a job. Omit to keep their groups.","maxItems":500,"type":"array","items":{"type":"object","properties":{"group_id":{"type":"string","format":"uuid","description":"Group id (UUID)."},"corrects":{"type":"boolean","description":"Grades the submissions of this group's students."},"answers_messages":{"type":"boolean","description":"This group's students can message them privately."}},"required":["group_id","corrects","answers_messages"]}},"dry_run":{"type":"boolean","description":"true = only show what would change."}},"required":["email","dry_run"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/invite_team_members":{"post":{"operationId":"invite_team_members","summary":"Invitar al equipo","description":"Give people a staff role in the academy (up to 50 emails). New people get an email to set their password; existing users get a notice. A teacher can only invite teachers; admins can also invite admins and only owners invite owners. Through an API key only the teacher role can be given. course_ids assigns new teachers to those courses (admins only). Confirm emails and role with the teacher first.","tags":["settings:write"],"x-scope":"settings:write","x-min-role":"instructor","x-kind":"write","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"emails":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","format":"email"}},"role":{"type":"string","enum":["owner","admin","instructor"],"description":"owner = propietario, admin = administrador, instructor = profesor."},"course_ids":{"maxItems":200,"type":"array","items":{"type":"string","format":"uuid"}},"send_invite":{"description":"false = add them without emailing. Default true.","type":"boolean"}},"required":["emails","role"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/change_team_role":{"post":{"operationId":"change_team_role","summary":"Cambiar el rol de alguien del equipo","description":"Change a staff member's role. Only owners change an admin's or owner's role, nobody changes their own, and the academy always keeps one owner. Through an API key the only role that can be given is teacher. Confirm with the teacher first.","tags":["settings:write"],"x-scope":"settings:write","x-min-role":"admin","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"role":{"type":"string","enum":["owner","admin","instructor"],"description":"owner = propietario, admin = administrador, instructor = profesor."}},"required":["email","role"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/remove_team_member":{"post":{"operationId":"remove_team_member","summary":"Quitar a alguien del equipo","description":"Take away someone's staff access. If they are also enrolled in a course they stay as a student; otherwise they leave the academy. Only owners remove admins or owners, nobody removes themselves, and the academy always keeps one owner. Confirm with the teacher first.","tags":["settings:write"],"x-scope":"settings:write","x-min-role":"admin","x-kind":"destructive","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"}},"required":["email"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/list_staff_roles":{"post":{"operationId":"list_staff_roles","summary":"Roles personalizados del equipo","description":"The academy's custom staff roles: name, the level each one is based on (instructor or admin), the panel sections it opens and who has it. Also lists every panel section id with its label and the lowest level that has it, for create_staff_role and assign_staff_role.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"admin","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/assign_staff_role":{"post":{"operationId":"assign_staff_role","summary":"Dar un rol personalizado a alguien del equipo","description":"Give a staff member one of the academy's custom roles, or take it away with staff_role_id null so they see everything their level allows. The person's level becomes the role's base level (instructor or admin), with the same rules as change_team_role: only owners change admins, nobody changes their own role, and you cannot give access to sections your own role lacks. Through an API key only instructor-based roles can be given. Confirm with the teacher first.","tags":["settings:write"],"x-scope":"settings:write","x-min-role":"admin","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"staff_role_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Custom role id from list_staff_roles; null removes the custom role."}},"required":["email","staff_role_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_notification_settings":{"post":{"operationId":"get_notification_settings","summary":"Avisos por defecto de la academia","description":"The academy's default notification settings: for each kind of notification (new submission, graded assignment, live class reminder, community activity…), whether it is sent in the platform, by email and as a push notification. Students always get these defaults; staff members may have changed their own in their profile, and those personal choices are private and not available here.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/set_notification_settings":{"post":{"operationId":"set_notification_settings","summary":"Cambiar los avisos por defecto de la academia","description":"Turn channels on or off in the academy's default notification settings. Students get the change; staff members who set their own notifications in their profile keep theirs. Only what you send changes. Admins only. Read get_notification_settings first and confirm with the teacher.","tags":["settings:write"],"x-scope":"settings:write","x-min-role":"admin","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"changes":{"minItems":1,"maxItems":18,"type":"array","items":{"type":"object","properties":{"notification":{"type":"string","enum":["assignment_submitted","assignment_graded","live_class_reminder","live_class_recording_ready","community_post_like","community_post_comment","community_post_reply","community_comment_like","community_new_post","community_mention_reply","lesson_comment_new","lesson_comment_reply","lesson_comment_like","question_comment_new","question_comment_reply","channel_message","staff_announcement","app_notice"]},"in_app":{"type":"boolean"},"email":{"type":"boolean"},"push":{"type":"boolean"}},"required":["notification"]}}},"required":["changes"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_vdocipher_settings":{"post":{"operationId":"get_vdocipher_settings","summary":"Conexión de VdoCipher","description":"How this academy connects VdoCipher, and whether it is ready for the AI tutor. Returns enabled, whether an API key is saved (never the key), the result of the last live check (playback_status: ready / key_invalid / missing_otpcreator; tutor_status: ready / captions_only / original_download_disabled / missing_download_permission / no_ready_videos), whether the key reached the tutor (tutor_key_sync), and the setup steps. Use it when an admin asks how to find the API secret, how to turn on original download, or why the tutor cannot read VdoCipher videos. API key: in the VdoCipher dashboard, left menu Config, Add API key, permissions otpcreator, editor and viewer; paste it in Integraciones → VdoCipher and press Guardar, which checks it live. Original download: left menu Security, then Advanced, then Enable download; VdoCipher emails a link that only a VdoCipher account admin can open; then press «Comprobar de nuevo». Without original download the tutor only reads videos with captions in the course language. The saved key cannot be shown or copied. Do not ask for the API secret and do not change these settings; the admin does that on the VdoCipher screen. Admins only.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"admin","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_vimeo_settings":{"post":{"operationId":"get_vimeo_settings","summary":"Conexión de Vimeo","description":"Which Vimeo accounts this academy connected and what each can do. For every account: name, Vimeo user id, plan, scopes, the last four characters of the token (never the token), and the last live check: tutor_status (ready / captions_only / scope_missing / plan_without_files / token_invalid), upload_status (ready / scope_missing / token_invalid), domains_status as read from the account's latest videos when the token was connected or re-checked (ok / missing with domains_missing / anywhere / embed_disabled / no_videos / unknown / unverified / token_invalid), and whether it receives live recordings. Also whether the AI tutor can use them (tutor_ready) and the setup steps. Use it when an admin asks how to connect Vimeo, why the AI tutor cannot read Vimeo videos, or why a Vimeo video is blocked on the campus domain. Setup: at developer.vimeo.com/apps, with the academy's Vimeo account, Create an app, then Generate an access token (Authenticated) with Public, Private, Video Files and Upload, and add it in Integraciones → Vimeo, which checks it live. One token per Vimeo account that holds course videos. Domains: in Vimeo's default video settings (vimeo.com/settings/videos/upload_defaults), «Where can your videos be embedded?» → «Only on sites I choose», add the domains the panel lists with «+ Add a domain», tick «Also apply to all existing videos» and Save. The LMS cannot change that list (Vimeo's API does not expose it) and does not add domains to videos; after changing it, the admin presses «Comprobar de nuevo» on the account. Do not ask for a token and do not change these settings; the admin does that on the Vimeo screen. Admins only.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"admin","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_systeme_integration":{"post":{"operationId":"get_systeme_integration","summary":"Estado de systeme.io","description":"How far this academy's systeme.io integration is, for admins: whether it is on, whether the API key is set (never the key), the webhook address and the four events to subscribe, the checklist of what is left, catalogue totals, purchases and pending sales. Start here. Then follow checklist. The API key, the webhook secret and the one-off import of current students stay on Integraciones → systeme.io. Read-only.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"admin","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/list_systeme_course_pairs":{"post":{"operationId":"list_systeme_course_pairs","summary":"Emparejar cursos de systeme.io","description":"systeme.io courses paired with academy courses, and the systeme.io courses still unpaired, for admins. levels lists each partial access level (the modules it leaves out and its group). drip is how many products open the course little by little. Read this before set_systeme_course_pairs. drip_group_id is the group dripped buyers join; its own schedule in the course is set on the Grupos screen. Without a catalogue sync there are no systeme.io courses to list: call sync_systeme_catalog first. Read-only.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"admin","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/list_systeme_products":{"post":{"operationId":"list_systeme_products","summary":"Productos de systeme.io","description":"The academy's systeme.io products (fichas) for admins: what each one grants, what systeme.io still delivers, and what needs review. filter incomplete is the panel's Por revisar; to_remove_in_systeme are fichas whose systeme.io product still delivers courses (remove those courses in systeme.io). Pass funnel_id from a previous call to see one funnel. Then get_systeme_product for one of them, or update_systeme_product to change what future sales grant. Read-only.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"admin","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","maxLength":200},"filter":{"type":"string","enum":["all","incomplete","no_ficha","paused","no_access","to_remove_in_systeme"]},"course_id":{"type":"string","format":"uuid","description":"Course id (UUID)."},"funnel_id":{"type":"string","maxLength":40},"include_inactive_funnels":{"type":"boolean"},"limit":{"type":"integer","minimum":1,"maximum":100},"offset":{"type":"integer","minimum":0,"maximum":9007199254740991}}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_systeme_product":{"post":{"operationId":"get_systeme_product","summary":"Ficha de un producto de systeme.io","description":"One systeme.io product in detail, for admins: what it grants, its plans, the sources assigned by hand, where it is sold and what to fix. Pass systeme_product_id or access_product_id from list_systeme_products. Then update_systeme_product, or delete_systeme_product. Read-only.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"admin","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"systeme_product_id":{"anyOf":[{"type":"string","pattern":"^[0-9]{1,18}$"},{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}]},"access_product_id":{"type":"string","format":"uuid","description":"Access product id (UUID)."}}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/list_systeme_pending_sales":{"post":{"operationId":"list_systeme_pending_sales","summary":"Ventas pendientes de systeme.io","description":"systeme.io sales still waiting for a product, for admins. Each plan lists how many sales are waiting, which ficha it is already assigned to, and the candidate fichas. Zero candidates: sync the catalogue or create the ficha. One candidate: process_systeme_pending_sales. Several: the sale was ambiguous; assign the plan to one ficha with update_systeme_product (assign_sources). Read-only.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"admin","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/list_systeme_events":{"post":{"operationId":"list_systeme_events","summary":"Avisos de systeme.io","description":"Recent systeme.io webhook events for admins. filter failed is the ones to look at; can_reprocess says whether reprocess_systeme_event can run that event again. Page size is fixed. Read get_systeme_integration for the count of failed events. Read-only.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"admin","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"filter":{"type":"string","enum":["all","failed","unmapped","SALE_NEW","SALE_CANCELED","tags"]},"page":{"type":"integer","minimum":1,"maximum":10000}}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/sync_systeme_catalog":{"post":{"operationId":"sync_systeme_catalog","summary":"Sincronizar el catálogo de systeme.io","description":"Reads the systeme.io catalogue into the academy's copy, for admins. It does not change fichas. One call works for up to 20 seconds; when done is false, call again with continue_with until done is true. rate_limited means wait wait_seconds and call again with the continue_with it returned, or with none if it returned none. Read get_systeme_integration first. Afterwards list_systeme_course_pairs.","tags":["integrations:write"],"x-scope":"integrations:write","x-min-role":"admin","x-kind":"write","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"continue_with":{"description":"The continue_with object from the previous call.","anyOf":[{"type":"object","properties":{"generation":{"type":"string","format":"uuid"},"phase":{"type":"string","enum":["steps","offers","funnels","product_ids","products","done"]},"cursor":{"anyOf":[{"type":"string","pattern":"^[1-9][0-9]{0,18}$"},{"type":"null"}]}},"required":["generation","phase","cursor"]},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/set_systeme_course_pairs":{"post":{"operationId":"set_systeme_course_pairs","summary":"Emparejar cursos con systeme.io","description":"Changes only the named systeme.io course pairs, for admins. course_id null removes a pair. Each partial level needs its own group: the group hides what that level does not include, and whole-course product fichas mark full access. level_groups names the levels to set; a null group_id removes that level and leaves the others. drip_group_id is the group of a course systeme.io also sells with dripping: fichas of dripped products get it, the course itself stays open, and the group needs its own schedule in the course (update_student_group release). A dripping group serves one course only. A group used here can no longer enroll students in that course. It applies to future sales. Call with dry_run first and confirm. Read list_systeme_course_pairs before, then list_systeme_products with filter incomplete.","tags":["integrations:write"],"x-scope":"integrations:write","x-min-role":"admin","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"pairs":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"systeme_course_id":{"anyOf":[{"type":"string","pattern":"^[0-9]{1,18}$"},{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}]},"course_id":{"anyOf":[{"type":"string","format":"uuid","description":"Course id (UUID)."},{"type":"null"}]},"systeme_course_name":{"type":"string","maxLength":200},"level_groups":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"level_key":{"type":"string","maxLength":4000},"group_id":{"anyOf":[{"type":"string","format":"uuid","description":"Group id (UUID)."},{"type":"null"}]}},"required":["level_key","group_id"]}},"drip_group_id":{"anyOf":[{"type":"string","format":"uuid","description":"Group id (UUID)."},{"type":"null"}]}},"required":["systeme_course_id","course_id"]}},"dry_run":{"type":"boolean"}},"required":["pairs"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/create_systeme_fichas":{"post":{"operationId":"create_systeme_fichas","summary":"Crear fichas de systeme.io","description":"Creates the missing access product for every systeme.io product in the catalogue copy, for admins. Products that already have one are left alone. It does not call systeme.io: sync_systeme_catalog first. Afterwards list_systeme_products with filter incomplete and fix what is left. Safe to call again.","tags":["integrations:write"],"x-scope":"integrations:write","x-min-role":"admin","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/create_systeme_product":{"post":{"operationId":"create_systeme_product","summary":"Crear una ficha de systeme.io","description":"Creates one access product, for admins. With systeme_product_id it is the ficha of that systeme.io product. Without it, it is a manual product (tags, loose plans, or no access when items is omitted). It applies to future sales. Read list_systeme_products first so you do not create a second ficha. Then get_systeme_product.","tags":["integrations:write"],"x-scope":"integrations:write","x-min-role":"admin","x-kind":"write","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"systeme_product_id":{"anyOf":[{"type":"string","pattern":"^[0-9]{1,18}$"},{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}]},"items":{"maxItems":50,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"course"},"course_id":{"type":"string","format":"uuid","description":"Course id (UUID)."},"access_days":{"anyOf":[{"type":"integer","minimum":1,"maximum":36500},{"type":"null"}]},"extra_access":{"type":"boolean"}},"required":["type","course_id"]},{"type":"object","properties":{"type":{"type":"string","const":"group"},"group_id":{"type":"string","format":"uuid","description":"Group id (UUID)."}},"required":["type","group_id"]}]}},"sources":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["price_plan","tag"]},"id":{"anyOf":[{"type":"string","pattern":"^[0-9]{1,18}$"},{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}]},"name":{"type":"string","maxLength":400}},"required":["source","id"]}}},"required":["name"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/update_systeme_product":{"post":{"operationId":"update_systeme_product","summary":"Editar una ficha de systeme.io","description":"Changes one access product for future sales, for admins. It does not change access already given. Pausing leaves its sales pending. Order of application: name or active, then remove_item_ids, update_items, add_items, unassign_source_ids, assign_sources. A plan assigned here is how an ambiguous pending sale gets a ficha. Read get_systeme_product first and confirm. Then list_systeme_pending_sales if you assigned a plan.","tags":["integrations:write"],"x-scope":"integrations:write","x-min-role":"admin","x-kind":"write","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"access_product_id":{"type":"string","format":"uuid","description":"Access product id (UUID)."},"name":{"type":"string","minLength":1,"maxLength":200},"active":{"type":"boolean"},"remove_item_ids":{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid"}},"update_items":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"item_id":{"type":"string","format":"uuid"},"access_days":{"anyOf":[{"type":"integer","minimum":1,"maximum":36500},{"type":"null"}]},"extra_access":{"type":"boolean"}},"required":["item_id"]}},"add_items":{"maxItems":50,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"course"},"course_id":{"type":"string","format":"uuid","description":"Course id (UUID)."},"access_days":{"anyOf":[{"type":"integer","minimum":1,"maximum":36500},{"type":"null"}]},"extra_access":{"type":"boolean"}},"required":["type","course_id"]},{"type":"object","properties":{"type":{"type":"string","const":"group"},"group_id":{"type":"string","format":"uuid","description":"Group id (UUID)."}},"required":["type","group_id"]}]}},"unassign_source_ids":{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid"}},"assign_sources":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["price_plan","tag"]},"id":{"anyOf":[{"type":"string","pattern":"^[0-9]{1,18}$"},{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}]},"name":{"type":"string","maxLength":400}},"required":["source","id"]}}},"required":["access_product_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/bulk_edit_systeme_products":{"post":{"operationId":"bulk_edit_systeme_products","summary":"Editar varias fichas de systeme.io","description":"Adds one course or group to many access products, or removes it from them, for admins. Products that already have it (or do not) stay as they are. Future sales only. Read list_systeme_products first and confirm the ids. Returns how many products changed.","tags":["integrations:write"],"x-scope":"integrations:write","x-min-role":"admin","x-kind":"write","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"access_product_ids":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","format":"uuid"}},"op":{"type":"string","enum":["add","remove"]},"item":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"course"},"course_id":{"type":"string","format":"uuid","description":"Course id (UUID)."},"access_days":{"anyOf":[{"type":"integer","minimum":1,"maximum":36500},{"type":"null"}]},"extra_access":{"type":"boolean"}},"required":["type","course_id"]},{"type":"object","properties":{"type":{"type":"string","const":"group"},"group_id":{"type":"string","format":"uuid","description":"Group id (UUID)."}},"required":["type","group_id"]}]}},"required":["access_product_ids","op","item"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/delete_systeme_product":{"post":{"operationId":"delete_systeme_product","summary":"Borrar una ficha de systeme.io","description":"Deletes an access product, for admins. Its future sales become pending; access already given stays. Call with dry_run first, show the name, what it grants and its assigned plans, and confirm. Read get_systeme_product before.","tags":["integrations:write"],"x-scope":"integrations:write","x-min-role":"admin","x-kind":"destructive","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"access_product_id":{"type":"string","format":"uuid","description":"Access product id (UUID)."},"dry_run":{"type":"boolean"}},"required":["access_product_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/process_systeme_pending_sales":{"post":{"operationId":"process_systeme_pending_sales","summary":"Procesar ventas pendientes","description":"Enrolls students for one pending systeme.io plan, up to 25 sales per call, for admins. When send_welcome_email is on, it also emails them their access. Call with dry_run first and confirm. Repeat while remaining is greater than 0. Read list_systeme_pending_sales first.","tags":["integrations:write"],"x-scope":"integrations:write","x-min-role":"admin","x-kind":"write","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"price_plan_id":{"anyOf":[{"type":"string","pattern":"^[0-9]{1,18}$"},{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}]},"dry_run":{"type":"boolean"}},"required":["price_plan_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/mark_systeme_plan_no_access":{"post":{"operationId":"mark_systeme_plan_no_access","summary":"Marcar un plan sin acceso","description":"Marks a systeme.io price plan as sold without course access, for admins, so its pending sales stop waiting. Future sales of that plan grant nothing. Read list_systeme_pending_sales first and confirm the plan really should not enroll anyone.","tags":["integrations:write"],"x-scope":"integrations:write","x-min-role":"admin","x-kind":"write","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"price_plan_id":{"anyOf":[{"type":"string","pattern":"^[0-9]{1,18}$"},{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}]},"name":{"type":"string","maxLength":200}},"required":["price_plan_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/reprocess_systeme_event":{"post":{"operationId":"reprocess_systeme_event","summary":"Reprocesar un aviso de systeme.io","description":"Runs one failed or skipped systeme.io event again, for admins. The integration has to be on. Read list_systeme_events with filter failed first and only pass an event whose can_reprocess is true. It can enroll a student.","tags":["integrations:write"],"x-scope":"integrations:write","x-min-role":"admin","x-kind":"write","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"event_id":{"type":"string","format":"uuid","description":"Event id (UUID)."}},"required":["event_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/set_systeme_settings":{"post":{"operationId":"set_systeme_settings","summary":"Activar systeme.io","description":"Turns the systeme.io integration on or off and sets what a cancellation, a removed tag or a new student does, for admins. With enabled true, sales start enrolling students. Turning it off keeps incoming events without applying them. Always confirm, and call with dry_run first. Read get_systeme_integration before. Send at least one field.","tags":["integrations:write"],"x-scope":"integrations:write","x-min-role":"admin","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"revoke_on_cancel":{"type":"boolean"},"revoke_on_tag_removed":{"type":"boolean"},"send_welcome_email":{"type":"boolean"},"dry_run":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_zoom_auto_record":{"post":{"operationId":"get_zoom_auto_record","summary":"Grabación automática de Zoom","description":"Whether the academy's Zoom meetings record to the cloud when the class starts, without the teacher pressing Record. Also how many classes already created and not yet finished would be affected. Admins only. Does not return Zoom secrets. One Pro license still hosts only one meeting at a time; this does not add licenses.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"admin","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/set_zoom_auto_record":{"post":{"operationId":"set_zoom_auto_record","summary":"Grabar las clases de Zoom al empezar","description":"Turn cloud recording on or off for the academy's Zoom meetings, including classes already created that have not finished. Admins only. Always call with dry_run first, tell the teacher how many upcoming classes would change, and save only after they confirm. Does nothing if Zoom is not connected. Does not buy Zoom licenses: overlapping classes still need one Pro license each. Idempotent.","tags":["settings:write"],"x-scope":"settings:write","x-min-role":"admin","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"record_on_start":{"type":"boolean"},"dry_run":{"description":"Preview only. Call this first and confirm with the teacher.","type":"boolean"}},"required":["record_on_start"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_teams_settings":{"post":{"operationId":"get_teams_settings","summary":"Microsoft Teams de la academia","description":"Whether Microsoft Teams is connected for live classes (meetings created on save, recordings imported, attendance pulled), which setup step failed the last connection check, whether meetings record when the class starts, and how many classes already created and not finished would follow that switch. Admins only. Never returns the client secret. To connect or fix the setup, send the admin to the panel link: the steps happen in Microsoft Entra ID and Teams PowerShell, not here.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"admin","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/set_teams_auto_record":{"post":{"operationId":"set_teams_auto_record","summary":"Grabar las clases de Teams al empezar","description":"Turn record-on-start on or off for the academy's Teams meetings (Teams also transcribes), including classes already created that have not finished. Admins only. Always call with dry_run first, tell the teacher how many upcoming classes would change, and save only after they confirm. Does nothing if Teams is not connected. Idempotent.","tags":["settings:write"],"x-scope":"settings:write","x-min-role":"admin","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"record_on_start":{"type":"boolean"},"dry_run":{"description":"Preview only. Call this first and confirm with the teacher.","type":"boolean"}},"required":["record_on_start"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_student_exit_url":{"post":{"operationId":"get_student_exit_url","summary":"URL de vuelta de los alumnos","description":"Where students go when they click Volver on the academy's own domain or when they sign out. Admins only. exit_url is what the academy saved (null if they left it empty). destination_url is where Volver sends them today when they have no external-site cookie. default_url is the fallback (the parent of the campus domain). Does not return DNS records or API keys. Use set_student_exit_url to change it.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"admin","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/set_student_exit_url":{"post":{"operationId":"set_student_exit_url","summary":"Cambiar la URL de vuelta","description":"Set or clear the https address students return to when they click Volver or sign out on the academy's own domain. Admins only. Always call with dry_run first, show the teacher the address, and save only after they confirm. Pass an empty string to clear it and use the parent site again. Idempotent. Does not change DNS or the campus domain.","tags":["settings:write"],"x-scope":"settings:write","x-min-role":"admin","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"https address, or a host without a scheme. Empty string clears the setting."},"dry_run":{"description":"Preview only. Call this first and confirm with the teacher.","type":"boolean"}},"required":["url"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/list_fundae_groups":{"post":{"operationId":"list_fundae_groups","summary":"Grupos FUNDAE","description":"The academy's FUNDAE training groups (newest window first): action, code, group number, course, modality, official hours, dates, status, tutor, participants and how many have finished.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["draft","open","closed","cancelled"]}}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_fundae_group":{"post":{"operationId":"get_fundae_group","summary":"Participantes de un grupo FUNDAE","description":"One FUNDAE group with every participant: company, campus hours, virtual-classroom hours, controls done, best score, whether they followed the sequence, and the verdict (finished, unfinished, withdrawn) with its reasons. National IDs are never shown. Verdicts are recalculated every night; recompute_fundae_group does it now.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"group_id":{"type":"string","format":"uuid","description":"FUNDAE group id (UUID)."}},"required":["group_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/recompute_fundae_group":{"post":{"operationId":"recompute_fundae_group","summary":"Recalcular un grupo FUNDAE","description":"Recalculate every participant's verdict now instead of waiting for the nightly run. Groups already closed keep their verdicts. Repeating it changes nothing new.","tags":["students:write"],"x-scope":"students:write","x-min-role":"instructor","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"group_id":{"type":"string","format":"uuid","description":"FUNDAE group id (UUID)."}},"required":["group_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/issue_fundae_certificates":{"post":{"operationId":"issue_fundae_certificates","summary":"Emitir diplomas y certificados FUNDAE","description":"Issue the diplomas (finished) and attendance certificates of a FUNDAE group, at most 20 per call; call again while remaining > 0. Participants who have not finished get none. Students see them in their certificates. Confirm with the teacher first.","tags":["students:write"],"x-scope":"students:write","x-min-role":"admin","x-kind":"write","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"group_id":{"type":"string","format":"uuid","description":"FUNDAE group id (UUID)."}},"required":["group_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/send_fundae_questionnaire":{"post":{"operationId":"send_fundae_questionnaire","summary":"Enviar el cuestionario de calidad FUNDAE","description":"Hand the FUNDAE quality questionnaire to every participant of a group who has not withdrawn. Answers are anonymous. Confirm with the teacher first.","tags":["messages:write"],"x-scope":"messages:write","x-min-role":"admin","x-kind":"write","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"group_id":{"type":"string","format":"uuid","description":"FUNDAE group id (UUID)."}},"required":["group_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/request_fundae_dossier":{"post":{"operationId":"request_fundae_dossier","summary":"Preparar el expediente FUNDAE","description":"Start building a group's inspection dossier (a ZIP with every participant's evidence). It takes a few minutes; the download appears in the group's Expediente tab. Also lists the latest builds and their status.","tags":["students:write"],"x-scope":"students:write","x-min-role":"admin","x-kind":"write","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"group_id":{"type":"string","format":"uuid","description":"FUNDAE group id (UUID)."}},"required":["group_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_oposiciones_settings":{"post":{"operationId":"get_oposiciones_settings","summary":"Ajustes de oposiciones","description":"Whether students see the vacancies map, calls and alerts; which oposiciones the academy prepares for by default; each course's own selection and whether its students see the map; and every oposición that can be picked (key and name).","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"admin","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/set_oposiciones_settings":{"post":{"operationId":"set_oposiciones_settings","summary":"Cambiar los ajustes de oposiciones","description":"Turn the students' vacancies map on or off, set the academy's default oposiciones, or set one course's oposiciones and map. Only what you send changes; an empty list means every oposición (academy) or the academy default (course). Use keys from get_oposiciones_settings and confirm with the teacher first.","tags":["settings:write"],"x-scope":"settings:write","x-min-role":"admin","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"students_see_map":{"type":"boolean"},"default_oposiciones":{"maxItems":64,"type":"array","items":{"type":"string","maxLength":64}},"courses":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"course_id":{"type":"string","format":"uuid","description":"Course id (UUID)."},"oposiciones":{"maxItems":64,"type":"array","items":{"type":"string","maxLength":64}},"students_see_map":{"type":"boolean"}},"required":["course_id"]}}}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/list_course_certificates":{"post":{"operationId":"list_course_certificates","summary":"Certificados de un curso","description":"Certificates already issued for one course: student name, email, public code, status (valid, expired, revoked, superseded, pending), issued and expiry dates, and the public verification URL. pending means the PDF is not stored yet. superseded was replaced by a newer certificate; revoked will not be issued again automatically. This is not who qualifies and has none yet: use issue_course_certificate with dry_run for that count. Newest first, at most 200. An instructor only sees courses they are assigned to.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"course_id":{"type":"string","format":"uuid","description":"Course id (UUID)."},"status":{"description":"Only this status. Omit to list every status.","type":"string","enum":["valid","expired","revoked","superseded","pending"]}},"required":["course_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/issue_course_certificate":{"post":{"operationId":"issue_course_certificate","summary":"Emitir certificados del curso","description":"Issue certificates to enrolled students who meet this course's rules and do not already have an active one. Call with dry_run first and confirm with the teacher: dry_run returns how many qualify and issues nothing. Then call with dry_run false. Each call checks at most 20 enrolled students from offset; call again with offset = next_offset while remaining > 0. remaining is students not checked yet, not certificates left to issue. Students with no name on their profile are skipped. Does not change the rules or the signature, and refuses while the course certificate is off. Repeating a finished pass issues nothing new.","tags":["students:write"],"x-scope":"students:write","x-min-role":"instructor","x-kind":"write","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"course_id":{"type":"string","format":"uuid","description":"Course id (UUID)."},"dry_run":{"description":"true = only report how many qualify. Call it first and confirm with the teacher.","type":"boolean"},"offset":{"description":"Enrolled-student offset from the previous call. Default 0.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["course_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_course_plan_times":{"post":{"operationId":"get_course_plan_times","summary":"Tiempo del plan de estudio de un curso","description":"Study planner time for one course: total planned minutes and lessons, and per module whether it is out of the plan, its lessons and planned minutes. With include_lessons, also each lesson's calculated minutes, the teacher's own time, whether it is optional or out of the plan, and the actual average of students who finished it. Omit course_id to list every course with its planned lessons, hours and how many lessons are out of the plan. Use set_plan_module_excluded to take a module out of the plan or back in. An instructor only sees courses they are assigned to.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"course_id":{"type":"string","format":"uuid","description":"Course id (UUID)."},"include_lessons":{"description":"Also list each lesson (at most 300). Default false.","type":"boolean"}}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/set_plan_module_excluded":{"post":{"operationId":"set_plan_module_excluded","summary":"Sacar módulos del plan de estudio","description":"Take whole modules of a course out of the study plan, or bring them back. A module out of the plan schedules none of its lessons, including lessons added to it later (for example a module that collects live-class recordings). Bringing it back restores each lesson as it was, including lessons the teacher marked optional. Does not change course content or what students can open. Always call with dry_run first, tell the teacher the modules and how the planned hours change, and save only after they confirm. Module ids come from get_course_plan_times. Idempotent. An instructor only changes courses they are assigned to.","tags":["settings:write"],"x-scope":"settings:write","x-min-role":"instructor","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"course_id":{"type":"string","format":"uuid","description":"Course id (UUID)."},"module_ids":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","description":"Module id (UUID)."}},"out_of_plan":{"type":"boolean","description":"true takes the modules out of the plan; false brings them back."},"dry_run":{"description":"Preview only. Call this first and confirm with the teacher.","type":"boolean"}},"required":["course_id","module_ids","out_of_plan"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_course_plan_setup":{"post":{"operationId":"get_course_plan_setup","summary":"Ajustes del plan de estudio de un curso","description":"How a course is planned and what students are asked when they set their time: plan mode and date or weeks, the academy's minimum study time, «fit to the date», the days-and-hours selectors with their limits and advice, and the questions asked before choosing a route (with ids, needed by save_study_route suggested_for). Also the academy's welcome screens, which views «Mi plan» offers (plan_views: both, day = only «Por días», topic = only «Por temas»), whether students see the times the platform estimates (show_estimated_times) and tutor contact button. Change them with set_course_plan_setup, set_planner_welcome and set_tutor_contact_button; routes themselves with get_study_routes and save_study_route. An instructor only sees courses they are assigned to.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"course_id":{"type":"string","format":"uuid","description":"Course id (UUID)."}},"required":["course_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/set_course_plan_setup":{"post":{"operationId":"set_course_plan_setup","summary":"Cambiar los ajustes del plan de estudio de un curso","description":"Change how a course is planned: plan_mode with its exam_date or recommended_weeks, the academy's minimum, fit_to_date, the days-and-hours selectors (days_and_hours; null switches back to setting each weekday) and the route questions (route_questions replaces the whole list; [] removes them; keep question_id and answer_id of existing ones so routes keep matching). Only the fields sent change. Always call with dry_run first, tell the teacher what changes and wait for a yes: students see it when they set or change their time. Read the current values with get_course_plan_setup. An instructor only changes courses they are assigned to.","tags":["settings:write"],"x-scope":"settings:write","x-min-role":"instructor","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"course_id":{"type":"string","format":"uuid","description":"Course id (UUID)."},"plan_mode":{"type":"string","enum":["open","duration","exam","off"]},"exam_date":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"recommended_weeks":{"anyOf":[{"type":"integer","minimum":1,"maximum":520},{"type":"null"}]},"minimum":{"anyOf":[{"type":"object","properties":{"minutes_a_day":{"type":"integer","minimum":15,"maximum":600},"days_a_week":{"type":"integer","minimum":1,"maximum":7}},"required":["minutes_a_day","days_a_week"]},{"type":"null"}]},"fit_to_date":{"type":"boolean"},"days_and_hours":{"anyOf":[{"type":"object","properties":{"max_hours_a_day":{"description":"Highest daily time; null = no maximum.","anyOf":[{"type":"number","minimum":0.5,"maximum":24},{"type":"null"}]},"min_hours_a_day":{"description":"Lowest daily time a student can pick in the box, by half hours, up to the course minimum; null = half an hour.","anyOf":[{"type":"number","minimum":0.5,"maximum":24},{"type":"null"}]},"intensive_from_hours":{"description":"From here up, the «intensive» advice; null = none.","anyOf":[{"type":"number","minimum":0.5,"maximum":24},{"type":"null"}]},"below_minimum":{"description":"warn (default): warn and plan anyway. contact: no plan, only «Hablar con mi tutor».","type":"string","enum":["warn","contact"]},"advice":{"type":"object","properties":{"below":{"type":"string","maxLength":400},"minimum":{"type":"string","maxLength":400},"range":{"type":"string","maxLength":400},"intensive":{"type":"string","maxLength":400}}}}},{"type":"null"}]},"route_questions":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"question_id":{"type":"string","maxLength":40},"question":{"type":"string","minLength":1,"maxLength":120},"answers":{"minItems":2,"maxItems":6,"type":"array","items":{"type":"object","properties":{"answer_id":{"type":"string","maxLength":40},"text":{"type":"string","minLength":1,"maxLength":120},"hint":{"type":"string","maxLength":200}},"required":["text"]}},"ask_only_if":{"description":"Ask it only after one of these answers to an earlier question.","type":"object","properties":{"question_id":{"type":"string","maxLength":40},"answer_ids":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","maxLength":40}}},"required":["question_id","answer_ids"]}},"required":["question","answers"]}},"dry_run":{"description":"Preview only. Call this first and confirm with the teacher.","type":"boolean"}},"required":["course_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/set_planner_welcome":{"post":{"operationId":"set_planner_welcome","summary":"Pantallas de bienvenida del plan de estudio","description":"The three welcome screens students see once, before setting their study time: turn them on or off, or write the academy's own title and text for each (empty = default copy). Also plan_views: which views students get in «Mi plan de estudio» (both, day = only «Por días», the calendar of each day; topic = only «Por temas», the course in route order, the only place that lists what has no day). And show_estimated_times: whether students see the times the platform estimates (minutes per task, each day's planned hours, hours left, minutes a day they are short), in their plan, calendar and reminders; off, they see tasks and dates only, while their own study time and the academy minimum still show. Only what is sent changes. Confirm the texts with the teacher before saving. Read the current ones with get_course_plan_setup. Academy admins only.","tags":["settings:write"],"x-scope":"settings:write","x-min-role":"admin","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"screens":{"description":"Up to three, in order. A missing or empty field uses the default copy.","maxItems":3,"type":"array","items":{"type":"object","properties":{"title":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"text":{"anyOf":[{"type":"string","maxLength":400},{"type":"null"}]}}}},"plan_views":{"description":"both, day or topic. Absent = left as it is.","type":"string","enum":["both","day","topic"]},"show_estimated_times":{"description":"Students see the platform's estimated times (true, the default) or only tasks and dates (false). Absent = left as it is.","type":"boolean"}}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/set_tutor_contact_button":{"post":{"operationId":"set_tutor_contact_button","summary":"Botón «Consultar con tu tutor»","description":"The «Consultar con tu tutor personal» button students see in the study plan form (and the only button left when a course asks for a talk with the tutor below its minimum). kind «message» opens a chat in Mensajes with the teacher of the student's group, or fallback_staff_user_id when they have none; «phone» opens WhatsApp on that number (with country code); «none» removes it. Confirm with the teacher before saving. Academy admins only.","tags":["settings:write"],"x-scope":"settings:write","x-min-role":"admin","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["none","message","phone"]},"fallback_staff_user_id":{"anyOf":[{"type":"string","format":"uuid","description":"Staff user id (UUID)."},{"type":"null"}]},"phone":{"description":"With the country code, e.g. +34 600 112 233.","type":"string","maxLength":40},"label":{"description":"Button text. Empty = «Consultar con tu tutor personal».","type":"string","maxLength":60}},"required":["kind"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_study_nudges":{"post":{"operationId":"get_study_nudges","summary":"Avisos de estudio de la academia o de un alumno","description":"Study nudges: the daily push or email reminders the platform sends students (morning plan, afternoon weak topic, evening streak). With student_id or email: whether that student gets them and why not (control group, their own settings, pause, no channel, all their courses switched off), their channel, streak and weekly freeze, and every nudge planned in the last `days` days with what it said, whether it was sent or skipped and why, and whether they opened it or studied after. Without a student: which courses have nudges switched off, which templates use the academy's own wording, and the latest nudges sent in the academy over the last 7 days with a summary. Read only.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"student_id":{"type":"string","format":"uuid","description":"Student user id (UUID)."},"email":{"description":"Student email, instead of student_id.","type":"string","format":"email"},"days":{"description":"Days back for one student's nudges. Default 14, at most 60.","type":"integer","minimum":1,"maximum":60}}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_study_routes":{"post":{"operationId":"get_study_routes","summary":"Rutas del planificador de un curso","description":"The teacher's routes for one course in the study planner (drafts and published), each with its audience and stages: kind (study, or review for a pass over lessons already studied), dates (calendar days, or weeks from each student's start), required, «at stage end», «if time allows» and «at the same time» lessons or modules with titles and minutes, the A/B choice and the live-class series that count. Also returns the course's modules and lessons (ids, titles, minutes; `side: true` marks the calculator module, which the course order leaves out), its recurring live-class series and the class recordings a route can name, which is what save_study_route needs to build a route from a teacher's plan or document. An instructor only sees courses they are assigned to.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"course_id":{"type":"string","format":"uuid","description":"Course id (UUID)."},"include_course_tree":{"description":"Also return the modules and lessons with ids. Default true.","type":"boolean"}},"required":["course_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/save_study_route":{"post":{"operationId":"save_study_route","summary":"Crear o cambiar una ruta del planificador","description":"Create a route for a course in the study planner, or replace an existing one (pass route_id; the whole route is replaced, so send every stage). Ids come from get_study_routes. Saved as a draft unless status is «published»: publish only when the teacher explicitly asks, since students see it in today's plan. Always call with dry_run first: it checks everything and returns, per stage, the required minutes, the projected finish for a student who starts today at the academy's default week, and whether each due date is met. Tell the teacher what you will save and wait for a yes. Keep stage_id when editing an existing stage so students' A/B choices are kept. Besides required lessons, a stage can have at_stage_end (tests and exams when it ends), if_time_allows, and at_the_same_time (a second list alongside, e.g. class recordings to catch up on). A stage of kind «review» is a pass over lessons already studied, and date_mode «from_student_start» counts weeks from each student's start; see the notes from get_study_routes. An instructor only changes courses they are assigned to.","tags":["settings:write"],"x-scope":"settings:write","x-min-role":"instructor","x-kind":"write","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"course_id":{"type":"string","format":"uuid","description":"Course id (UUID)."},"route_id":{"type":"string","format":"uuid","description":"Route id, to replace an existing route (UUID)."},"name":{"type":"string","minLength":1,"maxLength":120},"status":{"description":"Default draft.","type":"string","enum":["draft","published"]},"for_everyone":{"description":"Every student of the course. Default false.","type":"boolean"},"student_can_choose":{"description":"Offered to every student of the course to pick, with the other choosable routes (e.g. 12, 9 and 6 months). Default false.","type":"boolean"},"description":{"description":"What students read when choosing.","type":"string","maxLength":300},"weeks":{"description":"How long the route takes: the course's date for whoever follows it (counted from their enrollment). Omit to keep the course's.","type":"integer","minimum":1,"maximum":260},"months":{"description":"Length in calendar months instead of weeks (12 = the same day a year later); wins over weeks. null clears it. Omit to keep the route's.","anyOf":[{"type":"integer","minimum":1,"maximum":60},{"type":"null"}]},"ends_on_date":{"description":"«Termina en la fecha»: students with more time than needed do not finish sooner; the end date stays. Omit to keep the route's.","type":"boolean"},"pdf_minutes_per_page":{"description":"Study time per PDF page in this route (read, underline, memorize), e.g. 30 for a first full study, 10 for a revision; replaces the planner's 2 min of reading for every PDF the route asks for. null clears it. Omit to keep the route's.","anyOf":[{"type":"number","minimum":1,"maximum":120},{"type":"null"}]},"lesson_minutes":{"description":"Per-lesson times in this route only; they win over pdf_minutes_per_page and the course's time. Merged into the route's: lessons not listed keep theirs.","maxItems":500,"type":"array","items":{"type":"object","properties":{"lesson_id":{"type":"string","format":"uuid","description":"Lesson id (from get_course_outline or get_study_routes) (UUID)."},"minutes":{"anyOf":[{"type":"integer","minimum":1,"maximum":6000},{"type":"null"}],"description":"Minutes it takes in this route; null removes the route's time."}},"required":["lesson_id","minutes"]}},"suggested_for":{"description":"Choosable routes only: who it is proposed to, by their answers and daily time; the first route that fits is proposed. null clears it. Omit to keep the route's.","anyOf":[{"type":"object","properties":{"answers":{"description":"Route question id → option ids this route fits (ids from get_course_plan_setup). A question left out fits any answer.","type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":40}}},"min_hours_a_day":{"anyOf":[{"type":"number","minimum":0,"maximum":24},{"type":"null"}]},"max_hours_a_day":{"anyOf":[{"type":"number","minimum":0,"maximum":24},{"type":"null"}]}}},{"type":"null"}]},"group_ids":{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","description":"Student group id (UUID)."}},"student_ids":{"maxItems":200,"type":"array","items":{"type":"string","format":"uuid","description":"Student user id (UUID)."}},"date_mode":{"description":"calendar (default): starts_on/due_on are days. from_student_start: starts_week/due_week count from each student's start.","type":"string","enum":["calendar","from_student_start"]},"stages":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"object","properties":{"stage_id":{"type":"string","maxLength":64},"title":{"type":"string","minLength":1,"maxLength":120},"kind":{"description":"study (default), or review: a pass over lessons already studied.","type":"string","enum":["study","review"]},"note":{"description":"Shown to the student while the stage is current.","type":"string","maxLength":600},"starts_on":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"due_on":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"starts_week":{"description":"from_student_start only: opens on the first day of this week (1 = the first).","type":"integer","minimum":1,"maximum":260},"due_week":{"description":"from_student_start only: required lessons done by the last day of this week.","type":"integer","minimum":1,"maximum":260},"required":{"maxItems":300,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["lesson","module","folder","class_recordings","step"]},"id":{"type":"string","minLength":1,"maxLength":64,"description":"Lesson, module or folder id. For class_recordings: «all» or a series id from class_recordings. For step: the step_id of a step of the same stage."},"priority":{"description":"Default high. When the course is set to fit its date and a student's time does not reach it, low items are left out first, then medium.","type":"string","enum":["high","medium","low"]}},"required":["kind","id"]}},"at_stage_end":{"description":"Tests, exercises or exams given when the stage's required lessons are done.","maxItems":300,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["lesson","module","folder","class_recordings","step"]},"id":{"type":"string","minLength":1,"maxLength":64,"description":"Lesson, module or folder id. For class_recordings: «all» or a series id from class_recordings. For step: the step_id of a step of the same stage."},"priority":{"description":"Default high. When the course is set to fit its date and a student's time does not reach it, low items are left out first, then medium.","type":"string","enum":["high","medium","low"]}},"required":["kind","id"]}},"if_time_allows":{"maxItems":300,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["lesson","module","folder","class_recordings","step"]},"id":{"type":"string","minLength":1,"maxLength":64,"description":"Lesson, module or folder id. For class_recordings: «all» or a series id from class_recordings. For step: the step_id of a step of the same stage."},"priority":{"description":"Default high. When the course is set to fit its date and a student's time does not reach it, low items are left out first, then medium.","type":"string","enum":["high","medium","low"]}},"required":["kind","id"]}},"at_the_same_time":{"description":"A second list that runs alongside the stages from this one on.","type":"object","properties":{"items":{"maxItems":300,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["lesson","module","folder","class_recordings","step"]},"id":{"type":"string","minLength":1,"maxLength":64,"description":"Lesson, module or folder id. For class_recordings: «all» or a series id from class_recordings. For step: the step_id of a step of the same stage."},"priority":{"description":"Default high. When the course is set to fit its date and a student's time does not reach it, low items are left out first, then medium.","type":"string","enum":["high","medium","low"]}},"required":["kind","id"]}},"share_percent":{"description":"Share of study time it takes. Default 33.","type":"integer","minimum":10,"maximum":90}},"required":["items"]},"choice":{"type":"object","properties":{"a":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":80,"description":"What the student reads on the button."},"items":{"maxItems":300,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["lesson","module","folder","class_recordings","step"]},"id":{"type":"string","minLength":1,"maxLength":64,"description":"Lesson, module or folder id. For class_recordings: «all» or a series id from class_recordings. For step: the step_id of a step of the same stage."},"priority":{"description":"Default high. When the course is set to fit its date and a student's time does not reach it, low items are left out first, then medium.","type":"string","enum":["high","medium","low"]}},"required":["kind","id"]},"description":"May be empty (e.g. «wait for the classes»)."}},"required":["label","items"]},"b":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":80,"description":"What the student reads on the button."},"items":{"maxItems":300,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["lesson","module","folder","class_recordings","step"]},"id":{"type":"string","minLength":1,"maxLength":64,"description":"Lesson, module or folder id. For class_recordings: «all» or a series id from class_recordings. For step: the step_id of a step of the same stage."},"priority":{"description":"Default high. When the course is set to fit its date and a student's time does not reach it, low items are left out first, then medium.","type":"string","enum":["high","medium","low"]}},"required":["kind","id"]},"description":"May be empty (e.g. «wait for the classes»)."}},"required":["label","items"]}},"required":["a","b"]},"live_series_ids":{"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","description":"Live-class series id (UUID)."}},"steps":{"description":"Things to do that are not lessons (live class, review, mock exam…). Place each with a {kind: step, id: step_id} ref in required, at_stage_end or if_time_allows; an unplaced step goes at the end of required.","maxItems":60,"type":"array","items":{"type":"object","properties":{"step_id":{"description":"Short id the stage's refs use to place the step (e.g. «repaso-t1»). Keep it when editing so students' ticks are kept.","type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"type":{"description":"live class, review, mock exam, checkpoint (close of a block), or other. Default other.","type":"string","enum":["live","review","mock","checkpoint","other"]},"title":{"type":"string","minLength":1,"maxLength":120,"description":"What the student sees, e.g. «Repaso del tema 1»."},"explanation":{"description":"What to do, shown with the step.","type":"string","maxLength":600},"minutes":{"description":"Time it takes from the student's day. 0 = a reminder that takes no time. Default 0.","type":"integer","minimum":0,"maximum":480},"link":{"description":"What its button opens: a lesson, a module, or the campus calendar, the course's failed-questions review or the tests page.","anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["lesson","module"]},"id":{"type":"string","format":"uuid","description":"Lesson or module id (UUID)."}},"required":["kind","id"]},{"type":"object","properties":{"kind":{"type":"string","const":"page"},"page":{"type":"string","enum":["calendar","review","tests"]}},"required":["kind","page"]}]}},"required":["title"]}}},"required":["title","required"]}},"dry_run":{"description":"Check and preview only. Call this first.","type":"boolean"}},"required":["course_id","name","stages"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_student_mastery":{"post":{"operationId":"get_student_mastery","summary":"Árbol de dominio de un alumno","description":"One student's mastery map (árbol de dominio): how well they master each module and lesson of a course, from the short tests the map gives after each lesson. With course_id: every module (percent and module exam), every studyable lesson with its percent and its learning objectives, and their weakest lessons. Without course_id: a summary per course they are enrolled in (overall percent, modules, weakest lessons). Read only. For quiz scores use get_quiz_results; for lesson completion use get_student.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"student_id":{"type":"string","format":"uuid","description":"Student user id (UUID)."},"email":{"description":"Student email, instead of student_id.","type":"string","format":"email"},"course_id":{"type":"string","format":"uuid","description":"Course id (UUID)."}}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_course_mastery_overview":{"post":{"operationId":"get_course_mastery_overview","summary":"Árbol de dominio de un curso","description":"Mastery map (árbol de dominio) across the students of one course: per module and per lesson, how many students have a score, their average, and how many are weak (red) or strong (green); the lessons with the lowest average; the students with the lowest overall mastery; and how many have not tested anything yet. Students with current access only; staff are left out. Read only. For one student's map use get_student_mastery.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"course_id":{"type":"string","format":"uuid","description":"Course id (UUID)."}},"required":["course_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_question_bank":{"post":{"operationId":"get_question_bank","summary":"Banco de preguntas: categorías y temas","description":"Overview of the academy's question bank: every category (folder tree, with the course it belongs to, question counts including subcategories, and the course quizzes that draw from it at random) and every theme (the tags students pick in Tests by theme, with question counts), plus the Tests settings teachers change in the bank: whether Tests are on and whether they also draw questions that belong to no course. Start here to get category_id and theme_id values. To read the questions themselves use list_bank_questions.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/list_bank_questions":{"post":{"operationId":"list_bank_questions","summary":"Preguntas del banco","description":"Questions in the question bank, newest edit first, 25 per page, with their options and which is correct, explanation, where the answer is in the syllabus (syllabus_location), category, themes, the courses they belong to, and the course quizzes that use them. syllabus_location is null when the question has none. Its opens field is lesson, video (with at, like 12:30), pdf (with page), block (a video or PDF from the start) or text (a location with no lesson, so the student sees words only). A question can belong to several courses: because a course quiz uses it (used_in_tests) or because the academy assigned it to the course in the panel (assigned). Filter by category (includes subcategories), theme, course, origin or a search over name and wording. editable_by_claude is false when a course quiz uses the question: then it can only be changed in the panel. Get ids from get_question_bank. Lesson ids for a new location come from get_course_outline.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"category_id":{"type":"string","format":"uuid","description":"Category (UUID)."},"theme_id":{"type":"string","format":"uuid","description":"Theme (UUID)."},"course_id":{"description":"Questions that belong to this course: used by its quizzes or assigned to it.","type":"string","format":"uuid"},"search":{"description":"Words in the name or the wording.","type":"string","maxLength":200},"origin":{"description":"manual = written in the panel or by Claude, imported = Moodle/QSM/file imports, ai = generated from lessons.","type":"string","enum":["manual","imported","ai"]},"page":{"description":"Default 1.","type":"integer","minimum":1,"maximum":500}}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/create_bank_questions":{"post":{"operationId":"create_bank_questions","summary":"Crear preguntas en el banco","description":"Add up to 40 multiple-choice questions to the question bank, optionally in a category and tagged with themes so they reach students' Tests by theme. For true/false use two options. Every question is checked before anything is saved; if one is wrong nothing is created. Call with dry_run first, show the teacher the questions and confirm.","tags":["question_bank:write"],"x-scope":"question_bank:write","x-min-role":"instructor","x-kind":"write","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"questions":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":4000,"description":"The question as the student reads it."},"options":{"minItems":2,"maxItems":10,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":1000},"correct":{"description":"true for every right answer.","type":"boolean"}},"required":["text"]},"description":"Answer options in display order; mark at least one correct. True/false = two options."},"explanation":{"description":"Shown to the student after answering.","type":"string","maxLength":4000},"name":{"description":"Short internal name. Defaults to the start of the wording.","type":"string","maxLength":280}},"required":["prompt","options"]}},"category_id":{"type":"string","format":"uuid","description":"Category to file them in (UUID)."},"theme_ids":{"description":"Themes to tag every question with.","maxItems":10,"type":"array","items":{"type":"string","format":"uuid"}},"dry_run":{"description":"true = only report what would happen. Use it first and show the teacher.","type":"boolean"}},"required":["questions"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/create_bank_category":{"post":{"operationId":"create_bank_category","summary":"Crear una categoría en el banco","description":"Create a folder in the question bank, optionally inside another category and tied to a course. A subcategory inherits its parent's course unless course_id is given. Confirm the name with the teacher first.","tags":["question_bank:write"],"x-scope":"question_bank:write","x-min-role":"instructor","x-kind":"write","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":280},"parent_id":{"type":"string","format":"uuid","description":"Parent category (UUID)."},"course_id":{"type":"string","format":"uuid","description":"Course (UUID)."},"description":{"type":"string","maxLength":4000}},"required":["name"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/create_bank_theme":{"post":{"operationId":"create_bank_theme","summary":"Crear un tema","description":"Create a theme: the tag students choose in Tests by theme. Names are unique (case-insensitive). Tag questions with it using set_question_themes or theme_ids in create_bank_questions.","tags":["question_bank:write"],"x-scope":"question_bank:write","x-min-role":"instructor","x-kind":"write","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":280}},"required":["name"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/set_question_themes":{"post":{"operationId":"set_question_themes","summary":"Asignar o quitar un tema a preguntas","description":"Tag (assigned: true) or untag (assigned: false) bank questions with one theme. Tagging changes which questions students get in Tests by theme; it never changes course quizzes. Ids not in the bank are ignored. Repeating the call changes nothing.","tags":["question_bank:write"],"x-scope":"question_bank:write","x-min-role":"instructor","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"theme_id":{"type":"string","format":"uuid","description":"Theme (UUID)."},"question_ids":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string","format":"uuid"}},"assigned":{"type":"boolean"}},"required":["theme_id","question_ids","assigned"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/update_bank_question":{"post":{"operationId":"update_bank_question","summary":"Editar una pregunta del banco","description":"Change the wording, options, explanation, name, category or syllabus location of one bank question. Refused when a course quiz uses it (editable_by_claude false in list_bank_questions). Giving options rewrites them all and turns the question into multiple choice. Send explanation \"\" to remove it, category_id null to take it out of its category. syllabus sets where the answer is: lesson_id from get_course_outline, and optionally a video or PDF of that lesson (block_id) with a minute (12:30) or a PDF page. clear_syllabus removes it. When changing the location, call with dry_run first, show the teacher syllabus_location and save only after they confirm. Show the teacher any other change and confirm first too.","tags":["question_bank:write"],"x-scope":"question_bank:write","x-min-role":"instructor","x-kind":"write","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"question_id":{"type":"string","format":"uuid","description":"Bank question (UUID)."},"name":{"type":"string","minLength":1,"maxLength":280},"prompt":{"type":"string","minLength":1,"maxLength":4000,"description":"The question as the student reads it."},"options":{"minItems":2,"maxItems":10,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":1000},"correct":{"description":"true for every right answer.","type":"boolean"}},"required":["text"]},"description":"Answer options in display order; mark at least one correct. True/false = two options."},"explanation":{"description":"Shown to the student after answering.","type":"string","maxLength":4000},"category_id":{"anyOf":[{"type":"string","format":"uuid","description":"Category (UUID)."},{"type":"null"}]},"syllabus":{"description":"Replaces where the answer is in the syllabus.","type":"object","properties":{"lesson_id":{"type":"string","format":"uuid","description":"Lesson from get_course_outline (UUID)."},"block_id":{"type":"string","format":"uuid","description":"Video or PDF of that lesson. Omit for the whole lesson. (UUID)."},"minute":{"description":"Where the video opens, e.g. 12:30. A bare 12 means minute 12. Only with a video block.","type":"string","maxLength":20},"page":{"description":"PDF page. Only with a PDF block.","type":"integer","minimum":1,"maximum":100000}},"required":["lesson_id"]},"clear_syllabus":{"description":"Remove the location. Do not send it together with syllabus.","type":"boolean"},"dry_run":{"description":"true = only report what would happen. Use it first and show the teacher.","type":"boolean"}},"required":["question_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/delete_bank_questions":{"post":{"operationId":"delete_bank_questions","summary":"Borrar preguntas del banco","description":"Delete bank questions. Questions a course quiz uses are skipped and reported; reusable tests that contain a deleted question lose it. Call with dry_run first, show the teacher what would go and confirm.","tags":["question_bank:write"],"x-scope":"question_bank:write","x-min-role":"instructor","x-kind":"destructive","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"question_ids":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"string","format":"uuid"}},"dry_run":{"description":"true = only report what would happen. Use it first and show the teacher.","type":"boolean"}},"required":["question_ids"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/delete_bank_theme":{"post":{"operationId":"delete_bank_theme","summary":"Borrar un tema","description":"Delete a theme. Its questions stay in the bank but lose the tag, and students no longer see the theme in Tests by theme. Course quizzes are not affected. Confirm with the teacher first.","tags":["question_bank:write"],"x-scope":"question_bank:write","x-min-role":"instructor","x-kind":"destructive","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"theme_id":{"type":"string","format":"uuid","description":"Theme (UUID)."}},"required":["theme_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/list_reusable_tests":{"post":{"operationId":"list_reusable_tests","summary":"Tests reutilizables del banco","description":"The reusable tests saved in the question bank (newest first, up to 50): name, category, course and how many questions each has. Filter by category (subcategories included), course or a word in the name. Use get_reusable_test for the questions of one.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"category_id":{"type":"string","format":"uuid","description":"Category (UUID)."},"course_id":{"type":"string","format":"uuid","description":"Course (UUID)."},"search":{"type":"string","maxLength":200}}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_reusable_test":{"post":{"operationId":"get_reusable_test","summary":"Ver un test reutilizable","description":"One reusable test with its settings and its questions in order (id and name). Read it before update_reusable_test so you send the full question list.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"reusable_test_id":{"type":"string","format":"uuid","description":"Reusable test (UUID)."}},"required":["reusable_test_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/create_reusable_test":{"post":{"operationId":"create_reusable_test","summary":"Crear un test reutilizable","description":"Save a set of bank questions as a reusable test (at most 1000 questions, in the order given). Find the questions with list_bank_questions and confirm the list with the teacher first. It does not add the test to any lesson.","tags":["question_bank:write"],"x-scope":"question_bank:write","x-min-role":"instructor","x-kind":"write","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":280},"description":{"type":"string","maxLength":4000},"question_ids":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","format":"uuid"}},"category_id":{"type":"string","format":"uuid","description":"Category (UUID)."},"course_id":{"type":"string","format":"uuid","description":"Course (UUID)."},"passing_score_percent":{"type":"number","minimum":0,"maximum":100},"max_attempts":{"type":"integer","minimum":1,"maximum":50},"time_limit_minutes":{"description":"0 = no limit.","type":"integer","minimum":0,"maximum":1440},"show_feedback":{"type":"boolean"},"show_correct_answers":{"type":"boolean"}},"required":["name","question_ids"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/update_reusable_test":{"post":{"operationId":"update_reusable_test","summary":"Editar un test reutilizable","description":"Change a reusable test. Only the fields you send change. question_ids replaces the whole list, so read get_reusable_test first and send every question to keep. Lessons that already copied it are not affected.","tags":["question_bank:write"],"x-scope":"question_bank:write","x-min-role":"instructor","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"reusable_test_id":{"type":"string","format":"uuid","description":"Reusable test (UUID)."},"name":{"type":"string","minLength":1,"maxLength":280},"description":{"type":"string","maxLength":4000},"question_ids":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","format":"uuid"}},"category_id":{"description":"null = no category.","anyOf":[{"type":"string","format":"uuid","description":"Category (UUID)."},{"type":"null"}]},"course_id":{"description":"null = no course.","anyOf":[{"type":"string","format":"uuid","description":"Course (UUID)."},{"type":"null"}]},"passing_score_percent":{"type":"number","minimum":0,"maximum":100},"max_attempts":{"type":"integer","minimum":1,"maximum":50},"time_limit_minutes":{"description":"0 = no limit.","type":"integer","minimum":0,"maximum":1440},"show_feedback":{"type":"boolean"},"show_correct_answers":{"type":"boolean"}},"required":["reusable_test_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/delete_reusable_test":{"post":{"operationId":"delete_reusable_test","summary":"Borrar un test reutilizable","description":"Delete a reusable test. Its questions stay in the bank and lessons that copied it keep their quiz. Confirm with the teacher first.","tags":["question_bank:write"],"x-scope":"question_bank:write","x-min-role":"instructor","x-kind":"destructive","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"reusable_test_id":{"type":"string","format":"uuid","description":"Reusable test (UUID)."}},"required":["reusable_test_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/update_bank_category":{"post":{"operationId":"update_bank_category","summary":"Editar una categoría del banco","description":"Rename a question bank category, change its description or course, or move it (with its subcategories) under another category or to the top level (parent_id: null). A move that would take questions out of a course quiz's random draw is refused, because that would change the quiz.","tags":["question_bank:write"],"x-scope":"question_bank:write","x-min-role":"instructor","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"category_id":{"type":"string","format":"uuid","description":"Category (UUID)."},"name":{"type":"string","minLength":1,"maxLength":280},"description":{"type":"string","maxLength":4000},"course_id":{"description":"null = not tied to a course.","anyOf":[{"type":"string","format":"uuid","description":"Course (UUID)."},{"type":"null"}]},"parent_id":{"description":"null = top level.","anyOf":[{"type":"string","format":"uuid","description":"New parent category (UUID)."},{"type":"null"}]}},"required":["category_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/delete_bank_category":{"post":{"operationId":"delete_bank_category","summary":"Borrar una categoría del banco","description":"Delete a question bank category. Its questions stay in the bank without a category and its subcategories move to the top level. Refused when a course quiz draws questions from it at random. Call with dry_run first and confirm with the teacher.","tags":["question_bank:write"],"x-scope":"question_bank:write","x-min-role":"instructor","x-kind":"destructive","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"category_id":{"type":"string","format":"uuid","description":"Category (UUID)."},"dry_run":{"description":"true = only report what would happen.","type":"boolean"}},"required":["category_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/set_questions_course":{"post":{"operationId":"set_questions_course","summary":"Vincular preguntas a un curso","description":"Link (linked: true) or unlink (linked: false) bank questions to a course, which decides where they show when the bank is filtered by course. It does not add or remove them from any quiz; an unlinked question a course quiz still uses keeps showing for that course. Ids not in the bank are ignored. Repeating the call changes nothing.","tags":["question_bank:write"],"x-scope":"question_bank:write","x-min-role":"instructor","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"course_id":{"type":"string","format":"uuid","description":"Course (UUID)."},"question_ids":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","format":"uuid"}},"linked":{"type":"boolean"}},"required":["course_id","question_ids","linked"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/list_channels":{"post":{"operationId":"list_channels","summary":"Canales de mensajes","description":"Chat channels in Mensajes: who can see each one (the whole academy, one course, one or more student groups, or invited students), whether students can write, and whether it is archived. Use the group ids from list_groups. Hidden when the academy community is off.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"include_archived":{"description":"Default false.","type":"boolean"}}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/create_channel":{"post":{"operationId":"create_channel","summary":"Crear un canal","description":"Create a chat channel in Mensajes for the whole academy, the students of one course, the students of one or more groups, or specific students. A student sees a group channel when they belong to any of those groups. An admin can target any group. An instructor can target only groups they teach (see list_groups teachers). Always call with dry_run first, show the teacher the name and who would see it, and create only after they confirm. Use list_groups for group ids and list_courses for the course id.","tags":["messages:write"],"x-scope":"messages:write","x-min-role":"instructor","x-kind":"write","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","maxLength":200},"audience":{"type":"string","enum":["academy","course","groups","private"]},"course_id":{"type":"string","format":"uuid","description":"Course id, when audience is course (UUID)."},"group_ids":{"description":"Student group ids from list_groups, when audience is groups.","maxItems":50,"type":"array","items":{"type":"string","format":"uuid"}},"student_ids":{"description":"Student user ids, when audience is private.","maxItems":100,"type":"array","items":{"type":"string","format":"uuid"}},"read_only_for_students":{"type":"boolean"},"dry_run":{"description":"Preview who would see it. Call this first and confirm with the teacher.","type":"boolean"}},"required":["name","audience"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/set_channel_archived":{"post":{"operationId":"set_channel_archived","summary":"Archivar un canal","description":"Archive or restore a chat channel. Archived channels disappear for students. An instructor can archive a group channel only when they teach every group on it; admins can archive any channel except General. The academy General channel cannot be archived. Confirm with the teacher first. Use list_channels for the slug.","tags":["messages:write"],"x-scope":"messages:write","x-min-role":"instructor","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string","minLength":1,"maxLength":64},"archived":{"type":"boolean","description":"true = archive, false = restore."}},"required":["slug","archived"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/delete_channel":{"post":{"operationId":"delete_channel","summary":"Eliminar un canal","description":"Delete an archived chat channel for good, with every message in it, for everyone. Admins only. The channel must be archived first (set_channel_archived); General and Dudas generales can never be deleted. Refused while FUNDAE participants wrote in it and their group's records must still be kept; it can stay archived instead. Always call with dry_run first, tell the admin the channel name and how many messages will be lost, and delete only after they confirm. Use list_channels with include_archived for the slug.","tags":["messages:write"],"x-scope":"messages:write","x-min-role":"admin","x-kind":"destructive","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string","minLength":1,"maxLength":64},"dry_run":{"description":"Check it can be deleted and count its messages. Call this first and confirm with the admin.","type":"boolean"}},"required":["slug"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/list_cloud_files":{"post":{"operationId":"list_cloud_files","summary":"Ver la Nube de la academia","description":"The academy cloud («Nube»): images, documents, audio and videos shared by the whole staff, organised in folders. Without filters it lists one folder (folder_id or folder_path; the top level by default) plus its subfolders. Any filter (query, kind, from/to, uploaded_by_me) searches the whole cloud instead, and the folder is then ignored: filter folder_path in the results yourself. Returns each file's type (file or Bunny video), kind, size in bytes, folder path, upload date and uploader, and the full folder tree. Folder «Material de cursos» holds the files the academy's courses already used, one subfolder per course. Use the ids with move_cloud_files and create_cloud_folder.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"folder_id":{"type":"string","format":"uuid","description":"Folder id (UUID)."},"folder_path":{"description":"Folder by path instead of id, e.g. \"Material de cursos / Lengua\". \"/\" is the top level.","type":"string","maxLength":600},"query":{"description":"Part of the file name.","type":"string","maxLength":120},"kind":{"type":"string","enum":["image","video","audio","document","other"]},"from":{"description":"Uploaded on or after this day.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"description":"Uploaded on or before this day.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"uploaded_by_me":{"description":"Only files the connected person uploaded.","type":"boolean"},"sort":{"description":"Default newest.","type":"string","enum":["newest","oldest","name","size"]},"limit":{"description":"Default 50.","type":"integer","minimum":1,"maximum":200},"offset":{"type":"integer","minimum":0,"maximum":9007199254740991}}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/create_cloud_folder":{"post":{"operationId":"create_cloud_folder","summary":"Crear una carpeta en la Nube","description":"Create a folder in the academy cloud, at the top level or inside another folder (parent_folder_id or parent_folder_path). If a folder with that name already exists there it is returned instead of creating a duplicate. Call with dry_run first, tell the teacher where it will go, and create it only after they confirm.","tags":["files:write"],"x-scope":"files:write","x-min-role":"instructor","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":400},"parent_folder_id":{"type":"string","format":"uuid","description":"Parent folder id (UUID)."},"parent_folder_path":{"description":"Parent by path, e.g. \"Material de cursos\". Omit both for the top level.","type":"string","maxLength":600},"dry_run":{"description":"Preview only. Call this first and confirm with the teacher.","type":"boolean"}},"required":["name"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/move_cloud_files":{"post":{"operationId":"move_cloud_files","summary":"Mover archivos y carpetas de la Nube","description":"Move files, videos and folders of the academy cloud into another folder, or to the top level (target_folder_path \"/\"). Ids come from list_cloud_files (type file → file_ids, type video → video_ids). A folder moves with everything inside it and cannot go inside itself. Moving never changes lessons that use the files. Always call with dry_run first, show the teacher what moves where, and move only after they confirm. Idempotent.","tags":["files:write"],"x-scope":"files:write","x-min-role":"instructor","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"file_ids":{"maxItems":500,"type":"array","items":{"type":"string","format":"uuid","description":"Cloud file id (UUID)."}},"video_ids":{"maxItems":500,"type":"array","items":{"type":"string","format":"uuid","description":"Cloud video id (UUID)."}},"folder_ids":{"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","description":"Folder id (UUID)."}},"target_folder_id":{"type":"string","format":"uuid","description":"Destination folder id (UUID)."},"target_folder_path":{"description":"Destination by path, e.g. \"Portadas\". \"/\" is the top level.","type":"string","maxLength":600},"dry_run":{"description":"Preview only. Call this first and confirm with the teacher.","type":"boolean"}}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_cloud_storage":{"post":{"operationId":"get_cloud_storage","summary":"Espacio de la Nube","description":"How much of the academy cloud is used and what the cap is, matching the bar at the bottom of Nube. Bytes include files and Bunny videos. Vimeo and YouTube videos are not stored in the cloud and do not count. by_kind is what the bar shows (ready files, plus Bunny videos when the academy uploads them there). used_bytes also counts uploads still in progress, so remaining_bytes is what still fits. The default cap is 2 TB.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_profile_form":{"post":{"operationId":"get_profile_form","summary":"Cuestionario inicial","description":"The academy intake questionnaire: whether it is on, whether it blocks the campus, which student groups must complete it, and who receives the completion email (Avisar por correo / Quién lo recibe). An empty group list means every student. A student in any listed group sees it. email_notice.recipients is who would be emailed the next time a student completes it for the first time; empty when the notice is off. email_notice.everyone means every current owner and admin is ticked, including people added later. It does not return the questions or anyone's answers, and it cannot change who is ticked. Use list_groups for group ids.","tags":["academy:read"],"x-scope":"academy:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/set_profile_form_groups":{"post":{"operationId":"set_profile_form_groups","summary":"Grupos del cuestionario inicial","description":"Replace which student groups must complete the intake questionnaire. An empty group_ids list means every student. Does not change the questions, the required switch or the email notice. Always call with dry_run first, show the teacher who would see it, and save only after they confirm. Use list_groups for the ids.","tags":["students:write"],"x-scope":"students:write","x-min-role":"instructor","x-kind":"write","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"group_ids":{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","description":"Group id (UUID)."}},"dry_run":{"description":"true = only report who would see it. Call this first.","type":"boolean"}},"required":["group_ids"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/list_course_content":{"post":{"operationId":"list_course_content","summary":"Cursos cuyo contenido puedes ver","description":"Courses whose content you can read (modules, lessons, quizzes). Use the ids with get_course_outline. Read-only: Claude cannot change course content. If asked to, tell the teacher to make the change in the course editor.","tags":["authoring:read"],"x-scope":"authoring:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_course_outline":{"post":{"operationId":"get_course_outline","summary":"Índice de un curso","description":"Modules and lessons of one course, with their ids. Read-only: Claude cannot change course content. If asked to, tell the teacher to make the change in the course editor.","tags":["authoring:read"],"x-scope":"authoring:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"courseId":{"type":"string"}},"required":["courseId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_lesson":{"post":{"operationId":"get_lesson","summary":"Ver una lección","description":"Full content of one lesson: text, media, quizzes and their questions. Read-only: Claude cannot change course content. If asked to, tell the teacher to make the change in the course editor.","tags":["authoring:read"],"x-scope":"authoring:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"lessonId":{"type":"string"}},"required":["lessonId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/get_video_chapters":{"post":{"operationId":"get_video_chapters","summary":"Capítulos de un vídeo","description":"Chapters of the video blocks in one lesson: the titles and times students can jump to. Pass lesson_id from get_course_outline. Pass block_id (from a previous call) when the lesson has more than one video. Does not generate chapters.","tags":["authoring:read"],"x-scope":"authoring:read","x-min-role":"instructor","x-kind":"read","x-idempotent":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"lesson_id":{"type":"string","format":"uuid","description":"Lesson id (UUID)."},"block_id":{"type":"string","format":"uuid","description":"Video block id, when the lesson has more than one video (UUID)."}},"required":["lesson_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tools/duplicate_course":{"post":{"operationId":"duplicate_course","summary":"Duplicar un curso","description":"Create a new DRAFT course copied from an existing one, e.g. to prepare a new edition without touching the course current students use. Always copies modules, lessons and blocks. Optional parts (defaults in brackets): settings and appearance [true], assigned teachers [true], linked question bank questions as independent copies [false: the copy keeps using the same bank questions], quiz templates [false], AI-generated lesson objectives [true; their generated questions only travel with the bank copy]. Never copies students, progress, attempts, grades, submissions, comments or scheduled live classes. The copy is a draft that students cannot see until a teacher publishes it. Private 1:1 courses and courses in the trash cannot be copied. Call with dry_run first, tell the teacher what would be copied and the new name, and only then call again without dry_run. Large courses are copied in the background: the answer says so and the draft appears in the course list a few minutes later.","tags":["courses:write"],"x-scope":"courses:write","x-min-role":"instructor","x-kind":"write","x-idempotent":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"course_id":{"type":"string","format":"uuid","description":"Course to copy (UUID)."},"title":{"description":"Name of the new course. Default: the original title followed by \"(copia)\".","type":"string","minLength":2,"maxLength":160},"copy_settings":{"description":"Settings and appearance. Default true.","type":"boolean"},"copy_teachers":{"description":"Assigned teachers. Default true.","type":"boolean"},"copy_bank_questions":{"description":"Make independent copies of the course's bank questions and folders. Default false.","type":"boolean"},"copy_test_templates":{"description":"Quiz templates. Default false.","type":"boolean"},"copy_assessment":{"description":"AI-generated lesson objectives. Default true.","type":"boolean"},"dry_run":{"description":"true = only report what would be copied.","type":"boolean"}},"required":["course_id"]}}}},"responses":{"200":{"description":"Tool result in `data`.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}}}}},"400":{"description":"Invalid JSON or invalid arguments (`details` lists them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"A record the arguments point to does not exist in this academy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The academy's rules refused the change; `message` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}}}}