Skip to main content
Glama

Create a test payment

create_test_payment

Generate a KHQR test payment with a hosted checkout page using a kp_test_ key. Returns checkout_url and expires_at so you can simulate payment events during integration.

Instructions

Creates a KHQRPay test payment: a KHQR that no bank will pay, with a hosted checkout page. Only with a kp_test_ key: this server never creates live payments. Returns the payment, including checkout_url and expires_at. Move it with simulate_test_payment; the store's test webhook endpoints get the events.

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_test_payment"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountYesDollars with up to 2 decimals ("16.88"), or whole riel ("5000").
currencyNoThe currency the amount is in.USD
metadataNoYour own JSON object: up to 50 keys and 4 KB.
reference_idNoYour order id, as a string.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations declare a non-read-only, open-world, non-idempotent write; the description adds genuinely new behavior: nothing is actually charged, a hosted checkout page exists, the response carries checkout_url and expires_at, and events flow to the store's test webhook endpoints. The notable gap is duplicate handling — idempotentHint=false means repeating the same reference_id presumably creates another payment, and the description never warns about that.

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?

Four short sentences, front-loaded with what is created and then the key constraint and next step; no filler. The final clause ("the store's test webhook endpoints get the events") is compressed to the point of mild ambiguity but still earns its place.

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?

With no output schema, the description usefully names the returned fields (checkout_url, expires_at) and explains the side-effect channel via webhooks. Missing only the duplicate-request behavior an agent needs given a non-idempotent write.

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 amount format, currency enum, metadata limits and reference_id are already fully documented. The description names no parameters and adds no semantics beyond the schema, which is the expected baseline here.

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 ("Creates a KHQRPay test payment") and immediately qualifies it ("a KHQR that no bank will pay, with a hosted checkout page"), which separates it cleanly from a live payment tool and from siblings like simulate_test_payment.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Makes the key precondition explicit ("Only with a kp_test_ key") and rules out the live case, then routes state transitions to simulate_test_payment by name. It does not say where live payments are created or what to do if a caller needs one, but the when-to-use boundary is unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.