Skip to main content
Glama

Aitole — Kaspi Pay

Send Kaspi invoice to a phone

create_invoice

Send a Kaspi Pay invoice to the customer's phone number; the customer pays it in the Kaspi app. Amounts are whole tenge (KZT) as integers: 5000 means 5,000 tenge, no tiyn/decimals. Phone in E.164 (+77001234567). 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" (e.g. the number is not a Kaspi client). Use when you know the customer's Kaspi phone; for a scan-to-pay code use create_qr, for repeating charges use create_subscription. Returns the operation (id, status); follow it with get_operation until it is paid, cancelled 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>",
      "phone": "<phone>"
    },
    "name": "create_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
phoneYesCustomer phone in E.164 format, e.g. +77001234567. Must be a Kaspi client.
amountYesAmount to charge. Integer, whole tenge (KZT).
commentNoOptional comment shown with the invoice, e.g. "Order #1025".
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.7/5.0
Behavior5/5

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

Annotations only establish that this is a non-read-only, open-world, non-idempotent call; the description adds that creation is not payment, that only status "paid" confirms money moved, and that Kaspi may return "failed" when the number is not a client. That is exactly the behavioral context an agent needs before retrying or reporting success.

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?

Front-loads the action and payment mechanics, then packs unit and phone-format rules, failure semantics, sibling routing, and the required follow-up into a few dense sentences with no filler.

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?

With no output schema, the description still explains the return value (operation id and status) and what to do with it, and it covers the main failure mode and the not-equal-to-paid pitfall. Nothing material is missing for a six-parameter mutation call.

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%, so the baseline is 3. The description reinforces the two required parameters (whole-tenge integer with no tiyn, E.164 phone) but adds no meaning beyond the schema, and it says nothing about metadata, comment, connection_id, or idempotency_key.

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: send a Kaspi Pay invoice to a customer's phone, paid in the Kaspi app. It immediately distinguishes itself from create_qr and create_subscription by naming when each applies.

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?

Explicit when-to-use (you know the customer's Kaspi phone) plus named alternatives for the other two cases: create_qr for scan-to-pay and create_subscription for repeating charges. It also prescribes the follow-up step, polling get_operation until paid, cancelled, or expired.

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.