Skip to main content
Glama

cancel_leave

Destructive

Withdraw a hostel leave application on VTOP through a two-step preview and confirmation, so you can check approval status before completing the withdrawal.

Instructions

Withdraw a hostel leave application on VTOP. THIS WRITES TO VTOP, so it is deliberately two-step like apply_leave. Call 1 (preview): pass leaveId with confirm OMITTED or false. Nothing is withdrawn. You get back the leave's current record — type, dates, and approval status exactly as VTOP prints it — plus whether VTOP publishes a withdraw control for it, and a previewToken. Call 2 (withdraw): repeat the SAME leaveId plus confirm=true and the previewToken. The token is bound to this exact leave id and caller. Always show the user the preview — including the approval state — and get their agreement before calling with confirm=true. An already-approved leave may no longer offer a withdraw control; the preview says so. Never invent a previewToken or set confirm=true on a first call. Requires login.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmNoLeave this unset/false for the first call: nothing is withdrawn, and you get back the leave's current status plus a previewToken. Re-call with confirm=true and the SAME leaveId and token to actually withdraw. Never set confirm=true on the first call.
leaveIdYesThe leave id to withdraw, e.g. 'L9000001' (see get_leave_status).
previewTokenNoThe token returned by the preview call. Required with confirm=true. It is bound to this exact leave id and caller, so a different id or a forged token invalidates it — re-run the preview.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.5

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag destructive=true and idempotent=false, but the description adds substantial context beyond them: the two-step safety design, that the previewToken is bound to the exact leave id and caller, that an approved leave may lack a withdraw control, and that login is required. This is rich behavioral disclosure.

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?

Well front-loaded with the write warning, then the call sequence, then the caution. It is on the long side and some token-binding detail repeats across description and schema, but nearly every sentence carries operational value.

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 compensates by describing what the preview returns (type, dates, approval status, withdraw-control availability, previewToken). Combined with annotations covering the mutation profile, an agent has everything needed to call this correctly.

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

Parameters3/5

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

Schema description coverage is 100%, and the schema itself already documents confirm's two-step semantics and the token's binding to leave id/caller. The description reinforces but largely repeats that, so the baseline 3 applies with no meaningful addition beyond the schema.

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 — 'Withdraw a hostel leave application on VTOP' — and immediately distinguishes itself from the sibling apply_leave and the read-only get_leave_status. An agent can tell exactly what this does versus the other leave tools.

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 defines the two-call protocol, when to use each call (preview vs. confirm=true), what NOT to do ('Never invent a previewToken or set confirm=true on a first call'), and the user-agreement prerequisite. Alternatives and exclusions are named directly.

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