Skip to main content
Glama

Create payment link

create_payment_link

Creates a reusable Midtrans Payment Link URL that customers open to pay a specified amount in IDR.

Instructions

Create a reusable Midtrans Payment Link and return its URL. The customer opens the URL to pay. Amount is in IDR (integer).

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

Input Schema

NameRequiredDescriptionDefault
titleYesTitle shown on the payment page.
amountYesAmount in IDR (integer, no decimals).
descriptionNoOptional description shown on the payment page.
expiry_unitNoUnit for expiry_duration (default: days).
usage_limitNoOptional maximum number of times the link can be paid.
expiry_durationNoOptional link validity length, combined with expiry_unit.
customer_requiredNoWhether the customer must fill in their details.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does add real facts: the link is reusable, the return value is a URL, and amounts are IDR integers. It omits important behavior such as default expiry when expiry_duration is omitted, authentication/credential requirements, and whether repeated creation is idempotent.

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?

Three short sentences with the action and return value front-loaded and no filler. The closing currency note is slightly redundant with the schema but costs little.

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 7-parameter creation tool with no annotations and no output schema, the description covers the essential outcome (a URL the customer opens) and reusability. It leaves gaps around defaults for the optional expiry and usage_limit parameters and around auth expectations, but the fully documented schema compensates for most parameter detail.

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 every one of the 7 parameters is already documented in the schema. The description's only parameter-level statement, 'Amount is in IDR (integer)', restates what the amount property already says, adding no new meaning.

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?

States a specific verb and resource ('Create a reusable Midtrans Payment Link') and names the concrete output (its URL). It does not distinguish itself from the sibling create_snap_transaction, which also creates a payable artifact, so an agent cannot tell from this text alone which creation path to take.

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 only implied: 'The customer opens the URL to pay' suggests a hosted-link flow where the merchant hands off the URL. There is no explicit when-to-use versus create_snap_transaction, and no statement about when not to use it.

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