Skip to main content
Glama
stablevoy-mcp

stablevoy-mcp

Official

Cancel an unpaid invoice

cancel_invoice
DestructiveIdempotent

Cancel an unpaid invoice to stop the buyer from paying it, such as when an order is called off. It only works before any payment is recorded.

Instructions

Cancels an unpaid invoice so the buyer can no longer pay it, for example when the order was called off. Needs a store key (npx stablevoy-mcp login). 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.

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": {
      "invoiceId": "<invoiceId>"
    },
    "name": "cancel_invoice"
  }
}

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?

Goes well past the annotations, which only flag it as destructive/idempotent/open-world. It discloses the store-key auth path, the multi-store fallback behavior, the exact failure code invoice_not_cancellable with the resulting state, the paid_late handling of late money, and double-cancel behavior consistent with idempotentHint.

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?

Front-loaded with the action and effect, then prerequisites, then failure modes; no filler sentences. It is dense and long for one paragraph, but every clause carries operational information an agent needs.

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?

For a destructive, no-output-schema mutation, the description supplies the success semantics (invoice uncancellable state, idempotent re-cancel), error shape with codes and remediation, and auth requirements. Nothing essential for correct invocation is missing.

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 above baseline by explaining what happens when 'store' is omitted (all connected stores tried, only the owner cancels) and by naming the tools that produce a valid invoiceId — context the schema text does not provide.

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 ('Cancels an unpaid invoice') plus the concrete effect ('so the buyer can no longer pay it'). The unpaid-only scope distinguishes it from get_invoice and list_invoices without requiring the schema.

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?

Gives an explicit trigger context ('when the order was called off'), a prerequisite ('works only while no payment has been seen'), a pre-check alternative ('Use get_invoice first if you are not sure of its status'), and names the sources for the id (create_invoice, list_invoices, get_invoice). When-to-use and when-not-to-use are both covered.

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