Skip to main content
Glama

shop

Cancel payment

cancel_payment
Destructive

Stops the open payment attempt of the order, for example a bank or card page the shopper closed or wants to replace, so the cart opens again and place_order can start another method (bank transfer once the email is confirmed). A payment that already went through is never cancelled: the answer then says it is paid or still processing. Ask the shopper before cancelling. Needs the order reference from start_order (Authorization: Bearer mo1_… or the ref argument).

Input Schema

NameRequiredDescriptionDefault
refNoOrder reference (mo1_…) from start_order, only when the client cannot send it as Authorization: Bearer

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, but the description adds the crucial scope of that destruction — only the open attempt is stopped, settled payments are untouched and reported back as 'paid or still processing'. It also discloses the authentication requirement (Bearer mo1_…) and the state change that results (cart reopens).

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?

The core action is front-loaded and every sentence carries operational content — scope, exclusions, shopper confirmation, auth, follow-on tool. It is a dense single paragraph, though, and the parenthetical about bank transfer could be trimmed without losing much.

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 single-parameter tool with no output schema, the description covers everything an agent needs: what it affects, what it refuses to affect, what the response signals, required credentials, and how to recover the flow afterward. No meaningful gap remains.

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 schema already documents the single 'ref' parameter, and the description adds the meaningful fallback rule: the reference is only needed when the client cannot send it as an Authorization: Bearer header. It does not add format detail beyond the schema's mo1_… prefix, so it stays just above the baseline.

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 description opens with a specific verb and resource — 'Stops the open payment attempt of the order' — and immediately scopes it to attempts that are still open, which cleanly separates it from check_payment (read status) and place_order (start a new payment). An agent can identify the correct tool without inspecting 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?

It gives concrete when-to-use triggers ('a bank or card page the shopper closed or wants to replace'), an explicit when-not rule ('A payment that already went through is never cancelled'), and names the follow-on alternative ('place_order can start another method'). It also imposes a procedural gate: 'Ask the shopper before cancelling.'

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.

Resources