Skip to main content
Glama

build_payment

Read-only

Creates an unsigned atomic Solana transaction from a quote, combining payer-to-payee transfer and USDC fee to treasury; verifies token accounts and fee balance, then simulates it.

Instructions

Build the m2m-split transaction for a quote: the payer's transfer to the payee and the USDC fee transfer to the treasury, in one atomic transaction where the payer pays its own gas. Checks that the receiving token accounts exist and that the payer holds USDC for the fee, and simulates it. Unsigned. Sign it locally with your own Solana key; m2m.monster never sees or uses agents' private keys.

Input Schema

NameRequiredDescriptionDefault
payerYesThe payer wallet; it signs and pays the network fee
quoteYesThe signed quote exactly as returned by quote_payment
max_compute_unit_priceNoLower priority fee cap in micro-lamports per compute unit

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.1/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint, yet the description adds substantial behavior: it pre-checks that receiving token accounts exist and that the payer holds USDC, simulates before returning, returns an UNSIGNED transaction, and asserts the custody model (keys never seen by the service). This is exactly the extra context annotations don't carry.

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?

Two compact sentences with the core action and output state ('Unsigned') front-loaded; the security note about private keys is a slight tail addition but earns its place for an agent handing off signing.

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?

No output schema exists, and the description covers the essential return shape ('unsigned' transaction to be signed locally) plus the pre-flight checks that can fail. It stops short of specifying the serialization/encoding of the returned transaction and how failures surface, which an agent would still need to discover.

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 payer, quote, and max_compute_unit_price are already documented. The description reinforces the payer-pays-gas semantics but adds no new syntax or format detail beyond the schema, so the baseline 3 applies.

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+resource ('Build the m2m-split transaction for a quote') and enumerates the exact components produced: the payer→payee transfer and the USDC fee transfer to treasury, atomic, payer-funded gas. It is clearly distinguishable from quote_payment (which produces the quote) and submit_payment (which broadcasts).

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 implied by the workflow: the quote comes from quote_payment and the result must be signed locally, but the description never explicitly states when to call this versus build_refund or submit_payment, nor that it is the intermediate step between quote and submission. Adequate but relies on inference from sibling names.

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