Skip to main content
Glama

calculate_attendance

Read-onlyIdempotent

Calculates per-course VTOP attendance, safe skip buffer, and classes to attend, then projects future sessions to check if planned bunks keep you above target by a deadline.

Instructions

Attendance / bunk calculator. Per course: current %, whether you're safe (strictly above 74.0% by default — 74.0 is debarred; override via targetPercent), how many more classes you can skip ('bunkBuffer'), and how many to attend to recover ('classesToRecover'). For the key real use case — 'I'm at the line; if I skip today can I still make 75% by the time attendance closes?' — pass untilDate (the attendance-closing date; ASK THE USER for it) or toTermEnd: true to project to the last instructional day of the term automatically, plus bunkDates (the days you'd skip, e.g. today's date). Using the timetable + academic calendar (holidays, working Saturdays / day-orders) it returns per course: upcomingSessions until the deadline, ifAttendAllPercent/ifSkipAllPercent, maxSkippableInRange, mustAttendInRange, canBeSafeByDeadline, and — when bunkDates is given — plannedBunk (your final % and whether you're still safe if you skip exactly those days and attend everything else). Also returns a perDay breakdown of which classes fall on each upcoming day. If the response contains NOT_AUTHENTICATED, call get_captcha then login then retry. login auto-uses VTOP_USERNAME/VTOP_PASSWORD env vars if set; if it reports credentials missing, ask the user for them. Requires login.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bunkDatesNoDates (ISO YYYY-MM-DD) you plan to SKIP — e.g. today. Requires untilDate. For each course the tool reports whether you'd still be safe by the closing date if you skip exactly these days and attend everything else (`plannedBunk`).
toTermEndNoProject to the last instructional day of the semester (from the academic calendar) instead of passing untilDate yourself. Answers 'how many of my remaining classes must I attend to hold the target?' — holidays and working Saturdays are excluded automatically.
untilDateNoAttendance-closing date as ISO YYYY-MM-DD (e.g. a CAT-2 cutoff). When set, the tool projects every class from today to this date using the timetable grid + academic calendar (working days, holidays, working Saturdays / day-orders). Ask the user for this date if they want a deadline-aware answer.
courseCodeNoLimit to one course code (e.g. 'BCSE302L'), matched case-insensitively. Omit for all courses.
semesterIdNoSemester ID (e.g. 'CH20252605'). If omitted, uses the current semester.
targetPercentNoAttendance % to target. Default 74 — VIT requires 75% but 74.x rounds up to 75.
includeUntilDateNoWhether classes ON the closing date are counted. Default true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.5

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already establish readOnly/idempotent/non-destructive, and the description goes well beyond them: it discloses the login requirement, the NOT_AUTHENTICATED error token and its recovery sequence, credential sourcing via VTOP_USERNAME/VTOP_PASSWORD, and the fact that projections use the timetable grid plus academic calendar (holidays, working Saturdays). No contradiction with the readOnlyHint.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads purpose, then prerequisites, then the output contract. It is dense and long, and the long inventory of return-field names makes it feel encyclopedic, but with no output schema each of those field names is carrying needed payload, so the length is largely justified.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-required-param, 7-parameter analytical tool with no output schema, the description supplies the missing return-value documentation (upcomingSessions, ifAttendAllPercent, maxSkippableInRange, plannedBunk, perDay), the auth lifecycle, and the deadline-projection mechanics. An agent has everything needed to call and interpret it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, so the baseline is 3; the description earns an extra point by explaining cross-parameter semantics the schema does not — bunkDates requires untilDate, toTermEnd is an alternative to supplying untilDate, and the targetPercent default of 74 exists because VIT's 75% threshold rounds up from 74.x.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+resource pairing ('Attendance / bunk calculator') that instantly separates it from the sibling fetchers get_attendance and get_attendance_detail. It then enumerates the exact derived quantities it produces (current %, bunkBuffer, classesToRecover), so an agent knows this computes rather than retrieves.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly names the key use case ('I'm at the line; if I skip today can I still make 75%?') and the parameter combination that serves it (untilDate or toTermEnd, plus bunkDates). It also states the prerequisite (requires login) and the exact recovery path when auth fails (NOT_AUTHENTICATED -> get_captcha -> login -> retry), including the env-var fallback.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.