[{"data":1,"prerenderedAt":219},["ShallowReactive",2],{"agent-nav":3,"agent-skills":51},[4,17,43],{"id":5,"title":6,"links":7,"groups":16},"agents","AI connections",[8,10,13],{"title":6,"to":9},"\u002Fapi\u002Fmcp",{"title":11,"to":12},"What it can do","\u002Fapi\u002Fmcp\u002Ftools",{"title":14,"to":15},"Agent skills","\u002Fapi\u002Fskills",[],{"id":18,"title":19,"links":20,"groups":42},"clients","Set up your app",[21,24,27,30,33,36,39],{"title":22,"to":23},"Claude apps","\u002Fapi\u002Fmcp\u002Fclaude",{"title":25,"to":26},"Claude Code","\u002Fapi\u002Fmcp\u002Fclaude-code",{"title":28,"to":29},"ChatGPT","\u002Fapi\u002Fmcp\u002Fchatgpt",{"title":31,"to":32},"Codex","\u002Fapi\u002Fmcp\u002Fcodex",{"title":34,"to":35},"VS Code","\u002Fapi\u002Fmcp\u002Fvscode",{"title":37,"to":38},"Cursor","\u002Fapi\u002Fmcp\u002Fcursor",{"title":40,"to":41},"Gemini CLI","\u002Fapi\u002Fmcp\u002Fgemini-cli",[],{"id":44,"title":45,"links":46,"groups":50},"help","Partner API",[47],{"title":48,"to":49},"API documentation","\u002Fapi",[],[52,71,90,103,143,162,184],{"name":53,"description":54,"version":55,"license":55,"compatibility":56,"files":57,"bytes":70},"downloading-results-and-certificates-via-api","Collects Main Team olympiad results from a partner's own server with the REST API: listing a student's released certificates with listStudentCertificates (GET \u002Fv1\u002F{organizationId}\u002Fcertificate\u002F{userId}) and their result reports with listStudentReports, downloading each as a PDF with downloadCertificate and downloadReport, taking the file name from Content-Disposition, refusing a truncated transfer, understanding why one 404 covers a document that is missing, unreleased, cancelled or somebody else's, and finding new documents after an exam session by polling at a sensible pace because there are no webhooks. Also covers storing and serving the files safely. Use when writing or fixing code that fetches Main Team certificates, reports or result PDFs, schedules a results check after a sitting, or keeps a local copy in step.",null,"Needs an API account's apiKey and apiSecret on the machine that makes the calls, never in the conversation, and roles granting certificate\u002Fread and report\u002Fread on the olympiad in the path. Downloads answer bytes, not JSON, and need somewhere to write files.",[58,61,64,67],{"path":59,"bytes":60},"SKILL.md",5889,{"path":62,"bytes":63},"references\u002Fdocuments.md",4341,{"path":65,"bytes":66},"references\u002Foperations.md",1741,{"path":68,"bytes":69},"references\u002Fpolling-results.md",3012,14983,{"name":72,"description":73,"version":55,"license":55,"compatibility":74,"files":75,"bytes":89},"enrolling-students-in-olympiad-exams-via-api","Enters Main Team students for olympiad exams from a partner's own server with the REST API: reading the per-student picker listAvailableExams (GET \u002Fv1\u002F{organizationId}\u002Fexam\u002Favailable\u002F{studentId}) rather than guessing, creating an entry with createApplication, moving one to another exam or language with moveApplication, withdrawing one with deleteApplication, listing an organization's or a student's entries with their payment state, and the rule that a student must have signed in to an olympiad once before they can be entered there. Explains every 409 the three writes answer, which of them are safe to send twice, what a settled payment freezes, and what cannot be undone. Use when writing or fixing code that applies Main Team students to exams on stem, hilingua, neo, gmath or coding, changes or cancels an entry, or reconciles entries and fees.","Needs an API account's apiKey and apiSecret on the machine that makes the calls, never in the conversation, and roles granting exam\u002Fread and application\u002Fcreate, application\u002Fupdate or application\u002Fdelete on the olympiad in the path. Works against api.main-team.org or apisnd.main-team.org.",[76,78,81,84,87],{"path":59,"bytes":77},7448,{"path":79,"bytes":80},"references\u002Favailability.md",4204,{"path":82,"bytes":83},"references\u002Fconflicts.md",4442,{"path":85,"bytes":86},"references\u002Flifecycle.md",4896,{"path":65,"bytes":88},3720,24710,{"name":91,"description":92,"version":55,"license":55,"compatibility":93,"files":94,"bytes":102},"following-group-challenges-via-api","Follows a partner's own students through Main Team group challenges with the REST API: listing an olympiad's challenges with listGroupChallenges (GET \u002Fv1\u002F{organizationId}\u002Fgroup-challenge), reading where each student stands with listGroupChallengeStudents and getGroupChallengeStudent, reading their groups, steps and files with listGroupChallengeGroups and getGroupChallengeGroup and the group's history with listGroupChallengeActivity, and submitting a step or a group's finished work for one of the partner's students with submitGroupChallengeStep and submitGroupChallengeWork. Explains that teachers form groups and members upload in the panel or the app, that only the partner's own students are named, which 409 reasons wait on the members, why a repeat answers changed false, and what a 503 busy means. Use when writing or fixing code that tracks group challenge progress, sends a student to a challenge page, or submits group challenge work for a student.","Needs an API account's apiKey and apiSecret on the machine that makes the calls, never in the conversation, and roles granting group-challenge\u002Fread, and group-challenge\u002Fsubmit for the submits, on the olympiad in the path. Group challenges answer 404 on an olympiad where they are not switched on.",[95,97,100],{"path":59,"bytes":96},6359,{"path":98,"bytes":99},"references\u002Fgroup-challenges.md",3968,{"path":65,"bytes":101},3684,14011,{"name":104,"description":105,"version":55,"license":55,"compatibility":106,"files":107,"bytes":142},"integrating-main-team-api","Builds and debugs server-side integrations with the Main Team API (api.main-team.org\u002Fv1): signing HS256 tokens from an apiKey and apiSecret and reusing them, the success and error envelopes, organization ids, pagination, rate limits, retries and idempotency, polling for changes because there are no webhooks, and what to do about 400, 401, 403, 404, 409, 413, 415, 422, 429 and 503. Includes a token signer, a setup doctor and minimal Node.js and PHP clients. Use when writing, reviewing or fixing any code that calls the Main Team API, when a call answers something unexpected, and as the ground floor under the task skills registering-a-main-team-student, registering-main-team-students-from-spreadsheets, enrolling-students-in-olympiad-exams-via-api, downloading-results-and-certificates-via-api and managing-api-access-and-tokens.","The scripts need Node.js 18 or newer and no packages, and network access to api.main-team.org or apisnd.main-team.org. The API is called from servers only.",[108,110,113,116,119,122,125,127,130,133,136,139],{"path":59,"bytes":109},7753,{"path":111,"bytes":112},"assets\u002FAGENTS.snippet.md",1642,{"path":114,"bytes":115},"assets\u002FMainTeamClient.php",5743,{"path":117,"bytes":118},"assets\u002Fminimal-client.mjs",4251,{"path":120,"bytes":121},"references\u002Fauthentication.md",4619,{"path":123,"bytes":124},"references\u002Ferrors.md",9377,{"path":65,"bytes":126},12196,{"path":128,"bytes":129},"references\u002Fpolling.md",3823,{"path":131,"bytes":132},"references\u002Frate-limits.md",4339,{"path":134,"bytes":135},"references\u002Fretries-and-idempotency.md",4663,{"path":137,"bytes":138},"scripts\u002Fdoctor.mjs",6348,{"path":140,"bytes":141},"scripts\u002Fsign-token.mjs",4805,69559,{"name":144,"description":145,"version":55,"license":55,"compatibility":146,"files":147,"bytes":161},"managing-api-access-and-tokens","Manages how a partner's server gets into the Main Team API and how its students get into an olympiad panel: signing an HS256 token from an apiKey and apiSecret with the kid, sub, iat and exp rules, reusing one token per process, reading the account and its roles with getCurrentApiAccount (GET \u002Fv1\u002Fapi-account\u002Fvalidate-me), ending a token early with revokeToken, keeping the secret out of code, chat and logs, what to do when it leaks (it cannot be rotated), and minting single-use 120-second sign-in links with createSigninLink (POST \u002Fv1\u002F{organizationId}\u002Fauth\u002Fsignin) that must be redirected to at once and never stored, logged, emailed or prefetched. Use when a call answers 401 or 403, when setting up or handing over credentials, when a token or secret may have leaked, or when building a go-to-my-olympiad button.","Needs an API account's apiKey and apiSecret on the machine that signs tokens, never in the conversation. Sign-in links need auth\u002Fsignin on the olympiad in the path; reading the account needs api\u002F* on mto. Works against api.main-team.org or apisnd.main-team.org.",[148,150,152,155,158],{"path":59,"bytes":149},6390,{"path":65,"bytes":151},1501,{"path":153,"bytes":154},"references\u002Frotation.md",3201,{"path":156,"bytes":157},"references\u002Fsignin-links.md",4254,{"path":159,"bytes":160},"references\u002Ftoken-rules.md",4210,19556,{"name":163,"description":164,"version":55,"license":55,"compatibility":165,"files":166,"bytes":183},"registering-a-main-team-student","Registers one Main Team student at a time with the REST API and keeps the record right: checking a registration with checkStudentRegistration (POST \u002Fv1\u002Fstudent\u002Fcheck) before writing, registerStudent (POST \u002Fv1\u002Fstudent) and what its 409 means, resolving country, grade, city and school by id or by name, finding an existing student with the email filter, giving a student access to olympiads such as stem, hilingua, neo, gmath or coding, updating a student with updateStudent, setting a password only when the account holds the sign-in permission, and linking a supervisor. Explains what to do when an email address is already held by one of your own students or by somebody else's. Use when writing or fixing code that creates or updates Main Team students one by one, or when a registration answers 400, 403, 409 or invalid_email. For 30 students or more at once, use registering-main-team-students-from-spreadsheets.","Needs an API account's apiKey and apiSecret on the machine that makes the calls, never in the conversation, and a role granting student\u002Fcreate and student\u002Fupdate on mto. Works against api.main-team.org or apisnd.main-team.org.",[167,169,172,175,177,180],{"path":59,"bytes":168},8146,{"path":170,"bytes":171},"references\u002Fduplicates.md",3841,{"path":173,"bytes":174},"references\u002Ffields.md",11251,{"path":65,"bytes":176},4285,{"path":178,"bytes":179},"references\u002Fpasswords.md",2858,{"path":181,"bytes":182},"references\u002Freference-data.md",3864,34245,{"name":185,"description":186,"version":55,"license":55,"compatibility":187,"files":188,"bytes":218},"registering-main-team-students-from-spreadsheets","Registers a class list, Excel or CSV roster of 30 to 1000 students with the Main Team API's bulk registration in one request: cleaning and checking the rows locally with a bundled Python script, building the body, sending it to createStudentImport (POST \u002Fv1\u002Fstudent\u002Fimport), reading the 422 row list when the batch is refused and fixing exactly those rows, and polling getStudentImport (GET \u002Fv1\u002Fstudent\u002Fimport\u002F{importId}) until the batch has succeeded or failed. The batch is all or nothing: when any row has a problem, including an address already held by one of your students or by anybody else, nothing is registered and the answer names every row at fault. Also covers lists under 30 rows, lists over 1000, giving the new students access to olympiads, the welcome email every student in the file receives, and resuming after a timeout without registering anyone twice. Use when a developer or an integration has to register many Main Team students from a file.","Needs an API account's apiKey and apiSecret on the machine that makes the calls, never in the conversation, and a role granting student\u002Fcreate on mto. The bundled script needs Python 3.8 or newer and no packages; it makes no network calls of its own. Works against api.main-team.org or apisnd.main-team.org.",[189,191,194,197,200,203,206,209,212,215],{"path":59,"bytes":190},8414,{"path":192,"bytes":193},"agents\u002Fopenai.yaml",277,{"path":195,"bytes":196},"assets\u002Fcolumn-aliases.json",2022,{"path":198,"bytes":199},"assets\u002Froster-template.csv",87,{"path":201,"bytes":202},"references\u002Fcolumns.md",5238,{"path":204,"bytes":205},"references\u002Femails.md",2745,{"path":207,"bytes":208},"references\u002Frejections.md",5074,{"path":210,"bytes":211},"references\u002Ftask-status.md",5887,{"path":213,"bytes":214},"references\u002Fworkflow.md",5469,{"path":216,"bytes":217},"scripts\u002Froster.py",16850,52063,1791554614406]