Skip to main content
Glama

Cancel a queued number order

cancel_number_order
DestructiveIdempotent

Cancel an out-of-region number order that is still queued (status pending only): it becomes cancelled, nothing is charged, and an account that has never topped up can order again. An order being provisioned right now returns in_progress - try again in a few minutes, or release the finished number over REST (DELETE /v1/numbers/{e164}) once it is done. A done or failed order returns invalid_transition. Cancelling an already cancelled order is harmless. Same data as POST /v1/numbers/orders/{id}/cancel (response schema in /openapi.json).

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_number_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
orderIdYesId of the number order to cancel, from list_number_orders or order_number_from_region.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare destructive=true and idempotent=true, yet the description adds real substance beyond them: no charge occurs, a never-topped-up account regains ordering ability, and each status yields a specific outcome (in_progress, invalid_transition, harmless no-op). That maps every mutation to its side effect and error state.

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?

Dense but zero waste: the happy path and its side effects come first, then the status-based failure branches, then the REST parity note. Every sentence carries distinct operational information; nothing is repeated from the title or annotations.

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 one-parameter mutation with no output schema, the description covers everything an agent needs: preconditions, side effects, each failure mode, idempotency behavior, and where the response schema lives. Nothing about invoking it correctly is left unstated.

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 single orderId parameter already documents its source (list_number_orders or order_number_from_region) and length bounds. The description adds no further format or sourcing detail, so the baseline 3 applies.

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 (cancel) and resource (number order) plus an explicit scope restriction: only out-of-region orders still in 'pending'. The status qualifier alone arms an agent to distinguish this from other cancel tools without opening 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?

Provides an explicit when/when-not matrix: pending-only for success, in_progress means retry later or use DELETE /v1/numbers/{e164}, done/failed returns invalid_transition, already-cancelled is harmless. The only absent element is naming sibling tools, but the in-definition conditions are exhaustive enough that the agent can self-route.

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.