Skip to main content
Glama

Buy extra credits with a Link payment token

payTopup
Destructive

Buy extra credits with a one-time Link Shared Payment Token (spt_...) the user approved in Link for exactly the amount getTopupQuote gives; when it answers "completed" the credits are in the account ("paid": they are on their way). For agents that run Link's CLI; otherwise use createTopupLink. A token buys one top-up, and payment_token is required here. Only when the user asked for the credits and approved the payment.

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": {
      "requestBody": "<requestBody>"
    },
    "name": "payTopup"
  }
}

Input Schema

NameRequiredDescriptionDefault
requestBodyYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / requestBody / properties / credits / example
      Added value: +1000
  2. Changed1 schema field changed
    • changedInput schema / properties / requestBody / properties / payment_token / description
      Previous value: -"A one-time Link Shared Payment Token (spt_...) for exactly the quoted amount."New value: +"A one-time Link Shared Payment Token (spt_...) for exactly the quoted amount. Leave it out to pay over MPP instead (a 402 challenge, then the credential in Payment-Authorization)."
  3. Added

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations by decoding outcome states: 'completed' means credits are in the account, 'paid' means they are on their way, and 'A token buys one top-up' explains the non-idempotency in concrete terms. With no output schema, this return-state disclosure carries real weight, and the mutation/consumption traits are consistent with destructiveHint=true and idempotentHint=false.

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?

Purpose is front-loaded and every sentence carries information, but the dense run-on with parentheticals ('("paid": they are on their way)') and 'A token buys one top-up, and payment_token is required here' could be tightened into a short constraint list.

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 nested-object, single-parameter mutation with no output schema, the definition covers when to call, which sibling to use instead, the token's exact-amount requirement, and what success states mean. The main residual gap is the credits amount semantics and what to do on a failed or expired token.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description compensates strongly for payment_token: one-time, user-approved in Link, scoped to exactly the quoted amount, required here, and single-use. The sibling 'credits' parameter is less served — it is implied to derive from getTopupQuote but its units and required correspondence to the quoted amount are not spelled out.

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 first sentence names a specific verb and resource ('Buy extra credits') and pins the mechanism ('one-time Link Shared Payment Token (spt_...)'), which separates it cleanly from getTopupQuote (quotes) and createTopupLink (alternate path). An agent can identify the tool without opening the 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?

Explicit routing: 'For agents that run Link's CLI; otherwise use createTopupLink' names the alternative and the condition selecting it. It also states the precondition 'Only when the user asked for the credits and approved the payment,' plus the constraint that the token must match the getTopupQuote amount.

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.