Skip to main content
Glama

Aitole — Kaspi Pay

Create Kaspi QR payment

create_qr

Create a Kaspi Pay QR payment for a given amount. Returns an operation with status "pending", qr_token (the link/QR to show the buyer; it lives about 5 minutes) and expires_at. Amounts are whole tenge (KZT) as integers: 5000 means 5,000 tenge, no tiyn/decimals. A payment is confirmed ONLY when the operation status is "paid"; creating a QR or invoice does not mean it was paid. Kaspi may refuse with status "failed" and failure_reason/failure_message. Use when the buyer scans a code on a screen or at the counter; to bill a known phone use create_invoice, for a reusable link use create_payment_link. Returns the operation (id, status, qr_token, expires_at); then follow it with get_operation until it is paid or expired.

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": {
      "amount": "<amount>"
    },
    "name": "create_qr"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountYesAmount to charge. Integer, whole tenge (KZT).
commentNoOptional comment, e.g. "Order #1024".
metadataNoOptional JSON object stored with the record and returned back (e.g. {"order_id": "1024"}).
connection_idNoOptional Kaspi connection (cash register) id. Only needed when the account has several connections.
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?

Well beyond the annotations: discloses the pending initial status, that qr_token lives about 5 minutes, that a payment counts as confirmed ONLY when status is 'paid', and that Kaspi can return 'failed' with failure_reason/failure_message. The annotations only say it is a non-read-only, open-world, non-idempotent write; the description adds the actual lifecycle and failure surface.

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?

Dense and front-loaded: purpose, return shape, amount convention, confirmation rule, failure mode, sibling routing, next step. Slight redundancy in stating the operation return fields twice (once as 'status pending, qr_token, expires_at' and again as 'id, status, qr_token, expires_at').

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?

No output schema exists, but the description covers the return fields, the short QR lifetime, the meaning of each status, failure fields, and the required follow-up call. For a money-moving create operation this is complete enough to invoke and poll correctly.

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 idempotency_key, metadata, comment and connection_id parameters are already thoroughly documented in the schema. The description adds only the amount convention with a concrete example (5000 = 5,000 tenge, no tiyn), which is a modest increment over 'Integer, whole tenge (KZT)'.

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 and resource ('Create a Kaspi Pay QR payment for a given amount') and immediately positions itself against siblings: create_invoice for a known phone, create_payment_link for a reusable link. An agent can select this tool without opening any 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?

Gives the positive trigger ('when the buyer scans a code on a screen or at the counter'), names two alternatives with the conditions that select them, and prescribes the follow-up ('then follow it with get_operation until it is paid or expired'). No inference required.

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.