Skip to main content
Glama

Cancel an invoice

cancel_invoice
Destructive

Cancel an invoice before payment is received and require confirm: true so the buyer can no longer pay it; test keys only, and the action cannot be undone.

Instructions

Cancel an invoice.

Only while nothing has arrived. Money that arrives later is still seen (the address stays watched) and lands in review.

Test keys only: refused with a live key.

Cannot be undone — Cancels the invoice: its buyer can no longer pay it. Ask the person first, then call with confirm: true.

Input Schema

NameRequiredDescriptionDefault
idYesThe object's id.
confirmYestrue once the person has agreed to this exact call. Without it nothing is done.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, but the description adds genuinely new behavior: irreversibility with the concrete consequence ('its buyer can no longer pay it'), the fact that later payments are still captured and routed to review, and a live-key refusal. It does not state the resulting invoice state or what the call returns, so it falls just short of exhaustive.

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?

Short and front-loaded, with the destructive consequence and confirmation requirement surfaced before the call. The telegraphic fragments ('Only while nothing has arrived') cost a little clarity for the space they save.

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

Completeness4/5

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

For a two-parameter mutation with no output schema, it covers preconditions, environment restriction, irreversibility and the human-in-the-loop requirement. The main omission is the post-call outcome — what state the invoice ends in and what is returned — which matters when no output schema documents it.

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 100% and the schema already defines both `id` and `confirm`, including that confirm means the person agreed. The description reinforces confirm as a human-agreement gate but adds no syntax or semantics beyond that, so the baseline 3 applies.

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?

States a specific verb and resource ('Cancel an invoice') that is unambiguous against siblings like retrieve_invoice, create_invoice or simulate_payment. It does not explicitly name a contrasting sibling, but the operation is distinct enough that no disambiguation is needed.

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

Usage Guidelines4/5

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

Gives real preconditions: 'Only while nothing has arrived' and 'Test keys only: refused with a live key', plus a confirmation protocol ('Ask the person first, then call with confirm: true'). It stops short of naming an alternative path (e.g. refund) for the case where money already arrived, which would have earned a 5.

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