Skip to main content
Glama

Cancel unpaid credit purchase

cancel_billing_order
DestructiveIdempotent

Cancel this unpaid order. If payment already settled, return its paid outcome; this does not refund a settled payment. Check status after a cancellation or payment race.

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": {
      "orderId": "<orderId>"
    },
    "name": "cancel_billing_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
orderIdYes

Output Schema

NameRequiredDescriptionDefault
stateYesPayment and credit fulfillment state.
sellerNoSeller of record.
teamIdNoBeneficiary team id.
creditsNoCredits purchased by this order.
orderIdYesClient-generated order UUID.
currencyNoOrder currency.
revisionYesQuote revision to approve when completing.
taxMinorNoTax in minor units.
teamNameNoBeneficiary team name.
expiresAtNoQuote expiry in Unix seconds.
feesMinorNoFees in minor units.
receiptUrlNoReceipt URL once paid.
totalMinorNoTotal to approve, in minor units.
refundTermsNoRefund terms to show before approval.
refundStatusNoRefund request status, separate from the payment state.
discountMinorNoDiscount in minor units.
retryGuidanceNoHow to safely resolve or retry this order.
subtotalMinorNoSubtotal in minor units.
verificationUrlNoSecure verification continuation for the purchaser, when required.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true, and readOnlyHint=false. The description adds genuinely useful behavior beyond that: if payment already settled it returns the paid outcome rather than cancelling, and it will not refund a settled payment, which is critical for an agent deciding whether to call it.

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?

Three short sentences, front-loaded with the action and followed by the settled-payment caveat and the race-condition advice; no filler. The final sentence is slightly terse about which tool to check status with, but nothing is wasted.

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?

An output schema exists, so return values need not be explained, and the description covers the key edge cases an agent needs: settled-payment behavior, no refund, and post-cancellation verification. Only the source of the orderId is left unaddressed.

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?

There is a single required orderId parameter, and schema description coverage is 0%, so the schema supplies only type/format/pattern with no prose meaning. The description says "this unpaid order" but adds nothing about how the orderId is obtained (e.g., from get_billing_order or list). Adequate but thin for a 0%-coverage parameter.

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?

"Cancel this unpaid order" states a specific verb and resource with a clear precondition (unpaid). It also implicitly distinguishes itself from request_billing_refund by stating it does not refund a settled payment, though it never names that sibling directly.

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?

Usage is implied by the "unpaid order" qualifier and the instruction to "check status after a cancellation or payment race," which points toward verifying with a status read. It does not explicitly say when not to use it (e.g., use request_billing_refund for settled payments) or name the tool to check status with.

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.