Skip to main content
Glama

Qut Pay (Kaspi QR payments)

Cancel an open invoice

qutpay_cancel_invoice
Idempotent

Closes a pending invoice. A QR may still be paid until expiresAt — then invoice.paid arrives anyway; handle it.

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": {
      "id": "<id>"
    },
    "name": "qutpay_cancel_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare idempotency, non-destructiveness, and open-world behavior. The description adds a non-obvious behavioral caveat: even after cancellation, a QR may be paid until expiresAt and invoice.paid will still arrive, which the agent must handle.

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?

Two short sentences, front-loaded with the core action and followed by a critical edge case. Every sentence carries useful information with no filler.

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?

For a one-parameter mutation, the description covers the main action and the key post-cancellation payment caveat. It leaves the id parameter undocumented, but given the simple schema and existing annotations, the description is largely complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% for the single required 'id' parameter, and the description never explains what that id refers to or its expected format. The agent must infer that it is the invoice identifier.

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?

The description states a specific verb and resource: 'Closes a pending invoice.' This makes the operation clear, but it does not explicitly differentiate cancel from sibling tools like qutpay_refund_invoice or qutpay_get_invoice.

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 phrase 'Closes a pending invoice,' but the description gives no explicit when-to-use guidance or comparison with alternatives such as refund_invoice. It does provide a useful edge-case warning about payments after cancellation, which helps usage decisions.

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.