Skip to main content
Glama

Cancel a booking

cancel_booking
DestructiveIdempotent

For a signed-in personal AI agent: cancel a visit, once the person approved the operation it returns (free or late, credits back). If the free window closes in between, the terms change and it asks again rather than forfeit credits the person did not agree to lose.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "bookingId": "<bookingId>"
    },
    "name": "cancel_booking"
  }
}

Input Schema

NameRequiredDescriptionDefault
approvalNoThe approval of the operation this tool returned with approval_required: { operation_id, revision, approver: "user" }, all three required; only the person approves. Call once without it, show operation.summary to the person, then call again with structuredContent.approval as it came.
bookingIdYes
expectFreeNo
idempotencyKeyNoAny unique string per intended action. A retry with the same key answers with the first result and never acts twice.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare destructive=true and idempotent=true, but the description adds substantive context beyond them: the operation is gated on a returned approval, the outcome is either free or late with credits returned, and if the free window closes the tool re-asks instead of forfeiting credits. That re-consent behavior is precisely the kind of non-obvious trait an agent needs and is not derivable from the annotations.

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

Conciseness3/5

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

Two sentences with no filler and useful front-loading ('For a signed-in personal AI agent'), but the core clause 'cancel a visit, once the person approved the operation it returns' is grammatically tangled and forces the reader to parse the approval sequencing out of a subordinate clause.

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

Completeness3/5

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

For a destructive, approval-gated mutation with no output schema and only half the parameters described, the definition covers the consent model and outcome types but omits permission requirements, behavior on already-cancelled bookings, and any indication of the response shape.

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 coverage is 50%: approval and idempotencyKey are richly documented in the schema, while bookingId and expectFree have no description anywhere. The description partially compensates by explaining the approval round-trip and the free-versus-late outcome that presumably corresponds to expectFree, but it never clarifies bookingId or when to set expectFree.

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

Purpose4/5

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

The description names a specific verb and resource ('cancel a visit') and scopes it to a signed-in personal AI agent operating on behalf of a person. It signals this is the actual cancellation rather than a preview, but it never names the sibling preview_cancel, so the agent must infer the distinction from names alone.

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

Usage Guidelines3/5

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

It implies the two-step approval flow (act only once the person has approved the returned operation) and states a re-approval condition when the free window closes. It gives no explicit when-to-use versus alternative guidance and never routes the agent to preview_cancel or explains prerequisites such as booking ownership.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources