Skip to main content
Glama

apply_leave

Preview and submit hostel leave requests on VTOP with a two-step confirm flow, validating dates, times, place, reason, and rules before filing.

Instructions

Apply for hostel leave on VTOP. THIS WRITES TO VTOP and creates a real request for your proctor, so it is deliberately two-step. Call 1 (preview): pass the details with confirm OMITTED or false. Nothing is sent. You get back the normalised values, every rule that fired, any classes the leave would make you miss, and a previewToken. Call 2 (submit): repeat the SAME details plus confirm=true and the previewToken. The token is server-signed, single-use and expires after 10 minutes, so if anything changed since the preview the submission is refused and you must preview again. Always show the user the preview and get their agreement before calling with confirm=true. Never invent a previewToken or set confirm=true on a first call. Rules enforced before submitting: OG1 (Day Outing) must return by 18:00 inclusive; dates must be ISO YYYY-MM-DD and not in the past; to-date cannot precede from-date; visiting place is required and capped at 150 characters; reason is required. Times are normalised, so '6:00 PM' becomes '18:00'. Requires login.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonYesReason for the leave. Keep it specific.
toTimeYesReturn time, same format as fromTime. For OG1 (Day Outing) it must be 18:00 or earlier - 18:00 itself is allowed, 18:01 is refused.
confirmNoLeave this unset/false for the first call: nothing is submitted, and you get back a preview plus a previewToken. Re-call with confirm=true and the SAME fields and token to actually submit. Never set confirm=true on the first call.
fromTimeYesDeparture time. 24-hour HH:MM is safest, but '6:00 PM', '1800' and '8.30' are all normalised automatically.
leaveCodeYesLeave type CODE, not the label. SO=Special Outing, WP=With Parent Leave, EP=Official Leaves, SV=Summer Vacation, WV=Winter Vacation, HT1=Home Town, LG1=Local Guardian, EY1=Emergency Leave, OG1=Day Outing. Use get_leave_types if unsure.
leaveToDateYesReturn date as ISO YYYY-MM-DD.
previewTokenNoThe token returned by the preview call. Required with confirm=true. It is checked against these exact field values, so editing any field after previewing invalidates it — re-run the preview.
leaveFromDateYesDeparture date as ISO YYYY-MM-DD. Must not be in the past.
visitingPlaceYesWhere you are going. Max 150 characters.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.5

TDQS

A4.9/5.0
Behavior5/5

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

Goes well beyond the annotations: discloses that this writes to VTOP, that the previewToken is server-signed, single-use and expires after 10 minutes, that a changed field invalidates it, and that login is required. The annotations (readOnlyHint=false, idempotentHint=false) are consistent with this and the description adds the full write-token lifecycle the agent cannot infer elsewhere.

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

Conciseness5/5

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

Front-loaded with the critical fact (this writes and creates a real request), then organised as Call 1 / Call 2 followed by enforced rules. Sentences are dense but each carries an operational fact; there is no filler.

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 still describes what the preview returns (normalised values, fired rules, missed classes, previewToken) and the failure mode on a stale token. For a high-stakes write tool needing auth and human confirmation, nothing essential is missing.

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 still adds value by stating rules not present in the schema, such as to-date not preceding from-date, and by summarising the OG1 18:00-inclusive cutoff and 150-char cap in prose. Most of the individual field detail (leave codes, time normalisation, token semantics) duplicates the schema, which keeps this from a 5.

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?

States a specific verb and resource ('Apply for hostel leave on VTOP') and immediately distinguishes itself from the sibling write path by declaring it creates a real request. An agent can tell it apart from cancel_leave, get_leave_status, and get_leave_history without opening any schema.

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 spells out the two-call protocol (preview vs submit), when to use each, the requirement to show the user the preview and get agreement, and the rule to never set confirm=true on a first call. It also routes the agent to get_leave_types when the leave code is unknown.

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