Skip to main content
Glama

build_refund

Read-only

Create an unsigned refund transaction from payee back to payer, linked to the original receipt. Sign locally with your Solana key; payee pays gas and no platform fee is charged.

Instructions

Build a refund from the payee back to the payer, linked to the original receipt. The payee signs it and pays its gas; it has no m2m.monster fee and the original fee is not returned. Unsigned. Sign it locally with your own Solana key; m2m.monster never sees or uses agents' private keys.

Input Schema

NameRequiredDescriptionDefault
amountYesRefund amount, at most the original gross amount
receiptYesReceipt JWS of the original payment

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.2/5.0
Behavior5/5

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

Goes well past the annotations by disclosing who signs, who pays gas, the absence of an m2m.monster fee, that the original fee is not returned, and that the artifact is unsigned and must be signed locally with the caller's own key. This is exactly the behavioral context an agent needs before calling a transaction-builder.

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, front-loaded with the action and direction, then economics, then signing model. Nothing is redundant and no sentence is padding.

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 two-parameter builder with no output schema, the description covers creation, linkage, cost model, signature requirement, and key handling. Only minor gaps remain, such as what exactly the returned unsigned artifact is or whether any submission step follows.

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 both parameters are already documented, and the description only restates that the refund ties to the original receipt. It adds the constraint that a refund is bounded by the original payment context, but no syntax or format detail beyond the schema.

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 (build) and resource (refund) plus the direction of funds (payee back to payer) and the anchor to the original receipt, which cleanly separates it from sibling build_payment. An agent can tell what this produces 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 Guidelines3/5

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

The description implies the trigger condition (a refund against an existing receipt) but never explicitly states when to use this versus build_payment, quote_payment, or verify_receipt. No exclusions or prerequisites are spelled out, leaving routing to inference.

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