Calculate class grades
calculate_class_gradesUse this when a teacher or tutor wants a weighted grade calculator for a whole class; list ID and info columns (student number, StudentID, email, SIS, section) in ignore_columns so they stay out of the grades. Examples: final grades from a gradebook, 'calculate my students' grades with Homework 20%, Quizzes 30%, Tests 50%', a gradebook template filled in, class average, or who is missing work. Takes a roster of scores (pasted table, list, or a Google Classroom / Canvas CSV or XLSX export as file) plus optional category weights, points possible, drop lowest per category, blank handling, extra credit and letter scale. Returns each student's final percent and letter (fraction math, rounded only for display), category scores, weights renormalized when a category has no graded work, class mean/median/distribution, missing-work list, and Excel + CSV downloads. Does not store data, connect to a school system, or make progress report PDFs (use generate_progress_reports).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "calculate_class_grades"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | A gradebook export as CSV or XLSX, e.g. the Google Classroom grades CSV or the Canvas gradebook export. One row per student, one column per assignment. | |
| term | No | Grading period, e.g. Fall 2026 Quarter 1. | |
| roster | No | The scores, one row per student: a pasted table (CSV, tab-separated or a markdown table) with a header row of assignment names, e.g. "Student, HW1, HW2, Quiz 1, Test 1\nAna Diaz, 18, 20, 9, 45\nBen Ito, 15, EX, 7, M". Also accepts a list of rows or [{"name":"Ana Diaz","scores":{"HW1":18,"Quiz 1":9}}]. Send this or file. | |
| blank_as | No | How to treat empty cells: not_graded (default, left out) or zero (count as 0). EX means excused (left out); M or missing counts as 0. | |
| students | No | Same as roster (either name works), e.g. [{"name":"Ana Diaz","scores":{"HW1":18}}]. | |
| id_column | No | The header of the student ID / student number column, if any, e.g. "StudentID". It is ignored (same as ignore_columns). | |
| categories | No | Category weights, e.g. "Homework 20%, Quizzes 30%, Tests 50%" or [{"name":"Quizzes","weight":30,"drop_lowest":1}]. Assignments are matched to categories by name (HW 3 -> Homework, Quiz 2 -> Quizzes, Unit Test -> Tests). Leave out for a total-points grade. | |
| class_name | No | Class name for the files, e.g. Algebra 1, Period 3. | |
| plus_minus | No | true for +/- letters (A+ 97, A 93, A- 90, ...). Default false. | |
| assignments | No | Optional details per assignment when names do not show the category or the points: [{"name":"Unit 1","category":"Tests","points_possible":50}], or lines like "Unit 1, Tests, 50". Mark bonus work with "extra_credit": true. | |
| drop_lowest | No | Drop each student's lowest scores per category, e.g. {"Quizzes": 1} or "Quizzes 1, Homework 2". A plain number applies to every category. | |
| letter_scale | No | Letter cutoffs. Default A 90, B 80, C 70, D 60, F below 60. Use "plus_minus" for A+ 97 / A 93 / A- 90 ... D- 60, or a custom list like "A 93, B 85, C 75, D 65". | |
| teacher_name | No | Teacher or tutor name for the reports, e.g. Ms. Rivera. | |
| ignore_columns | No | Columns that are not scores and must not be graded or copied, by header name: student IDs, student numbers, SIS/login/email, section, notes. Example: ["Student Number", "Email"] or "StudentID, Nr albumu". Always name ID and info columns here. | |
| points_possible | No | Points possible when the table does not say: one number for every assignment (e.g. 100), a list in column order (e.g. "20, 20, 10, 50"), or {"Quiz 1": 10}. A 'Points possible' row in the table or headers like "Quiz 1 (10)" also work. Default 100. | |
| category_scoring | No | How a category score is built: points (default, total points earned / possible in the category) or average (each assignment counts equally). | |
| round_for_letter | No | true to round the final percent to a whole number before picking the letter (89.5 -> 90 -> A). Default false: 89.5 is a B. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| notes | Yes | ||
| pages | No | ||
| stats | Yes | ||
| grading | Yes | ||
| privacy | Yes | ||
| students | Yes | ||
| warnings | Yes | ||
| downloads | Yes | ||
| categories | Yes | ||
| class_name | Yes | ||
| distribution | Yes | ||
| graded_count | Yes | ||
| letter_scale | Yes | ||
| missing_work | Yes | ||
| missing_total | Yes | ||
| students_count | Yes | ||
| students_shown | Yes | ||
| assignments_count | Yes |