Skip to main content
Glama

calculate_attendance

Read-onlyIdempotent

Calculates per-course attendance %, safe-to-skip and must-attend counts, and projects if planned absences keep you above target by a closing date.

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) and 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

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`).
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 cover the safe read-only profile, and the description goes well beyond them: it discloses the login requirement, the exact error-recovery sequence, credential sourcing (VTOP_USERNAME/VTOP_PASSWORD), and the fact that projections use the timetable grid plus academic calendar including holidays and working Saturdays. That is real behavioral context an agent needs before calling.

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?

Purpose and the headline use case are front-loaded, and the long middle sentence is dense with return-field names rather than filler. It is somewhat verbose and repeats the login/targetPercent points that the schema also carries, costing a point.

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?

With no output schema, the description fully carries the return-value burden: it enumerates upcomingSessions, ifAttendAllPercent, ifSkipAllPercent, maxSkippableInRange, mustAttendInRange, canBeSafeByDeadline, plannedBunk, and perDay. Authentication, defaults, and optional-parameter interactions are all covered.

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 100%, so the baseline is 3, but the description adds genuine meaning: it explains the targetPercent default rationale (74.x rounds to 75), that bunkDates requires untilDate, and frames the untilDate/bunkDates pairing as the primary use case rather than just restating field docs.

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?

The description opens with a specific verb+resource framing ('Attendance / bunk calculator') and enumerates exactly what it computes per course (current %, bunkBuffer, classesToRecover). It is clearly distinguished from the sibling get_attendance, which fetches raw data while this one computes projections.

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?

It names the 'key real use case' verbatim and gives the exact condition for passing untilDate and bunkDates ('I'm at the line; if I skip today can I still make 75%...'), including the instruction to ASK THE USER for the closing date. The authentication path (NOT_AUTHENTICATED -> get_captcha -> login -> retry, env var fallback) is spelled out explicitly.

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