Skip to main content
Glama
MercanPay

MercanPay MCP Server

Official
by MercanPay

Cancel invoice

cancel_invoice
DestructiveIdempotent

Cancels an unpaid invoice so it can no longer be paid, asking the user to confirm before proceeding.

Instructions

Cancel an unpaid invoice so it can no longer be paid. Ask the user to confirm first.

Input Schema

NameRequiredDescriptionDefault
idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, so the safety profile is known. The description adds genuinely new behavioral context: it only applies to unpaid invoices, and the agent must obtain user confirmation before invoking — an interaction protocol annotations cannot express. It stops short of saying what error or state results if the invoice is already paid.

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?

Two short sentences: the action and effect first, the confirmation requirement second. Every clause earns its place with no redundancy.

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 single-parameter destructive mutation with no output schema, the definition covers action, precondition, effect, and the confirmation requirement. It is only marginally short of complete: success/failure behavior for non-unpaid invoices and whether cancellation is reversible are left unstated.

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

Parameters2/5

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

There is one parameter (`id`) with 0% schema description coverage, so the schema contributes nothing. The description never mentions the parameter, its format, or where the invoice id comes from; the name alone makes 'invoice id' inferable, but the description does not compensate for the coverage gap.

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 gives a specific verb (cancel) and resource (invoice) plus the effect ('so it can no longer be paid') and a precondition ('unpaid'). It does not name a sibling, but no sibling overlaps with cancellation, so an agent can still discriminate it from get_invoice, create_invoice, simulate_payment, etc.

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?

It clearly scopes usage to unpaid invoices and adds an explicit interaction rule: 'Ask the user to confirm first.' No alternatives are needed here since no sibling performs cancellation, so the absence of an explicit alternative is not a real gap; what is missing is guidance for the paid-invoice case.

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