Skip to main content
Glama

Aitole — Kaspi Pay

Cancel operation (irreversible)

cancel_operation
Destructive

IRREVERSIBLE: cancel an unpaid QR or invoice so the customer can no longer pay it. It cannot be undone; ask the user to confirm the operation id before calling. Does not refund paid operations (use refund for that). Use only for an operation that is not paid yet; for a paid one use refund. Returns the updated operation.

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": {
      "operation_id": "<operation_id>"
    },
    "name": "cancel_operation"
  }
}

Input Schema

NameRequiredDescriptionDefault
operation_idYesOperation id to cancel.
idempotency_keyNoOptional. Your own unique id for this request, e.g. the order number "order-1024". Repeating a call with the same idempotency_key returns the same result instead of creating a duplicate, so pass one whenever you might retry. If omitted, a random key is generated (then a retry WILL create a duplicate).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

The annotations already declare destructiveHint=true and readOnlyHint=false, but the description adds critical context beyond them: the cancellation is irreversible, it prevents the customer from paying, it requires user confirmation, and it does not refund paid operations. It also notes that the updated operation is returned.

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 warning is front-loaded and the alternatives are clear. There is mild redundancy in repeating that paid operations require refund and in saying both IRREVERSIBLE and 'cannot be undone,' but the repetition reinforces safety-critical behavior without bloating the definition.

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, irreversible operation with no output schema, the description covers the essential behavior: what is cancelled, that it cannot be undone, the confirmation requirement, the paid/unpaid boundary, and the refund alternative. The remaining parameter details are fully handled by the schema.

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 description coverage is 100%, so both operation_id and idempotency_key are already documented in the input schema. The description adds only the confirmation context for operation_id and does not explain idempotency_key usage beyond what the schema provides, so the baseline score of 3 is appropriate.

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 states a specific verb and resource: cancel an unpaid QR or invoice. It clearly distinguishes this tool from refund by explaining that paid operations must use refund instead.

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 explicit when-to-use and when-not-to-use guidance: use only for unpaid operations, do not use for paid ones, and use refund for paid operations. It also instructs the agent to confirm the operation id with the user before calling.

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.