Skip to main content
Glama

Sandbox: principal pays a top-up link

sandbox_simulate_topup_payment

Sandbox only. Acts as the principal paying a get_topup_link URL: the mock provider sends a PayPlus-format IPN through the same webhook path production uses, and the wallet is credited. outcome "declined" simulates a failed card.

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": {
      "topup_id": "<topup_id>"
    },
    "name": "sandbox_simulate_topup_payment"
  }
}

Input Schema

NameRequiredDescriptionDefault
outcomeNoapproved (default) credits the wallet; declined simulates a failed card
agent_idNoYour agent id (or X-Agent-Id header)
topup_idYestopup_id from get_topup_link
agent_keyNoSecret returned by register_agent (or X-Agent-Key header)
principal_idNoThe principal you act for (or X-Principal-Id header)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / outcome / description
      Added value: +"approved (default) credits the wallet; declined simulates a failed card"
    • addedInput schema / properties / topup_id / description
      Added value: +"topup_id from get_topup_link"
  2. Changed4 schema fields changed
    • addedInput schema / properties / agent_id / pattern
      Added value: +"^[A-Za-z0-9._:-]{3,128}$"
    • addedInput schema / properties / agent_key / maxLength
      Added value: +256
    • addedInput schema / properties / principal_id / pattern
      Added value: +"^[A-Za-z0-9._:@-]{3,128}$"
    • addedInput schema / properties / topup_id / maxLength
      Added value: +128
  3. First observed

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses the side effects (an IPN is emitted via the production webhook path, the wallet is credited) and what the declined outcome simulates. It omits auth requirements and idempotency/repeat-payment behavior, which matter for a tool that mutates wallet state.

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?

Two sentences, zero waste, and the most consequential constraint ("Sandbox only") is front-loaded. The second sentence handles the single enum branch that changes meaning.

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 5-parameter mutation tool with no annotations and no output schema, the description covers the important behavioral arc: link payment, IPN emission, wallet credit, and the failure branch. It leaves the return shape and credential expectations unstated, a modest gap given the absence of an output schema.

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 schema already documents topup_id, outcome, and the three identity/credential parameters. The description adds only a restatement of the outcome semantics already present in the enum description; it says nothing new about agent_id, agent_key, or principal_id.

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?

Names a specific verb and resource ("Acts as the principal paying a get_topup_link URL") and immediately scopes it with "Sandbox only." It also distinguishes itself from the production path by explaining that the mock provider goes "through the same webhook path production uses," so an agent can tell it apart from get_topup_link and sandbox_simulate_activation.

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?

"Sandbox only" plus the reference to a get_topup_link URL gives clear preconditions and implies the workflow (obtain link, then simulate payment). It stops short of stating when-not to use it, e.g. that it must not be called against real money or that a link can only be paid once.

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.