Skip to main content
Glama
stablevoy-mcp

stablevoy-mcp

Official

Cancel an unpaid invoice

cancel_invoice
DestructiveIdempotent

Cancels an unpaid invoice so the buyer can no longer pay it, for example when an order is called off.

Instructions

Cancels an unpaid invoice so the buyer can no longer pay it, for example when the order was called off. Pass the invoiceId from create_invoice, list_invoices or get_invoice. Without store every connected store is tried and only the one that owns the invoice cancels it. It works only while no payment has been seen; otherwise it returns invoice_not_cancellable and the invoice stays as it is. Money that still arrives later is marked paid_late, and cancelling twice returns the invoice unchanged. Use get_invoice first if you are not sure of its status. A failure comes back as an error with its code and what to do, for example rate_limited with the seconds to wait.

Input Schema

NameRequiredDescriptionDefault
storeNoStore id or exact store name from list_stores. Needed only when several stores are connected.
invoiceIdYesThe invoice id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.0

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations it discloses the failure mode and code (invoice_not_cancellable), that the invoice is left untouched on failure, that late-arriving money is marked paid_late, the double-cancel result, and the store fan-out behavior when store is omitted. This is far more than destructiveHint/idempotentHint convey on their own.

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?

Sentences are ordered by importance: effect, identifier source, store behavior, precondition, edge cases, errors. It is slightly dense at five sentences, but nearly every clause carries distinct operational information rather than restating the name or title.

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 carries the full burden of explaining outcomes and does so: success semantics, per-error codes, idempotent repeat behavior, and the error envelope with remediation hints such as seconds to wait for rate_limited.

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 100%, so the baseline is 3; the description earns extra by explaining the consequence of omitting store (every connected store is tried and only the owner cancels) and by tying invoiceId to the tools that produce it. The store parameter's naming convention is still left to the schema rather than the prose.

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?

The opening states a specific verb, resource, and observable effect: 'Cancels an unpaid invoice so the buyer can no longer pay it.' The precondition 'unpaid' immediately separates it from payment-related siblings such as summarize_payments and list_invoices.

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?

It names the source of the identifier (create_invoice, list_invoices or get_invoice), gives an explicit pre-check ('Use get_invoice first if you are not sure of its status'), and states the when-not condition ('It works only while no payment has been seen'). No relevant alternative is left unaddressed.

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