Skip to main content
Glama

pay_x402_invoice

Pay any Algorand x402 invoice with any assets you hold, even if you lack the demanded one. Returns unsigned transaction groups to sign and submit in order.

Instructions

Pay ANY Algorand-settled x402 invoice with any 1-4 routable assets you hold, even if you hold none of the demanded asset. Pass the accepts entry you picked from the 402 response as invoice, plus your inputs (single input with no amount = minimum is solved for you). Returns UNSIGNED groups — sign everything in one pass, then submit the groups IN ORDER (swap first; its on-chain floor guarantees the payment is funded; if you already hold the demanded asset it is a single direct payment). Works for HOGSWAP credit top-up offers too: feed accepts[0] of the 402 straight in. EVM-settled invoices are not supported (no bridge). NEVER pass mnemonics or private keys to any tool — signing happens in YOUR wallet tooling, never on this server.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputsYes
api_keyNohsk_ API key override; omit to use the HOGSWAP_API_KEY env config
invoiceYes
user_addressYesYOUR address
Behavior5/5

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

With no annotations provided, the description fully carries the behavioral disclosure burden. It reveals return format ('Returns UNSIGNED groups'), execution order ('sign everything in one pass, then submit the groups IN ORDER'), special handling ('if you already hold the demanded asset it is a single direct payment'), and a critical security warning ('NEVER pass mnemonics or private keys to any tool'). This is exceptionally transparent.

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?

The description is dense but every sentence earns its place, covering purpose, usage, behavioral details, limitations, and security in a compact paragraph. It is front-loaded with the core action and structured logically from what to pass to what to expect.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (nested invoice and inputs objects, no output schema), the description covers return behavior, signing and submission order, special cases (HOGSWAP top-ups, holding no demanded asset), and constraints (max 4 inputs, EVM not supported). It is complete enough for an agent to invoke correctly without additional context.

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

Parameters5/5

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

The description adds meaning beyond the schema: it explains that `invoice` is the accepts entry from the 402 response, that a single `input` with no amount solves the minimum, that `inputs` can be any routable assets you hold even if not the demanded one, and that `api_key` is an override. With only 50% schema coverage, this fully compensates.

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 description opens with 'Pay ANY Algorand-settled x402 invoice with any 1-4 routable assets you hold' – a specific verb, resource, and scope that clearly distinguishes it from siblings like get_quote or build_swap. It also states what it does not do ('EVM-settled invoices are not supported'), further differentiating it.

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?

It provides explicit context: 'Pass the accepts entry you picked from the 402 response as invoice' and notes it works for HOGSWAP top-ups. It gives an exclusion for EVM invoices but doesn't explicitly name alternative tools for when not to use this one, leaving a slight gap in direct sibling comparison.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/LiquiHog/hogswap-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server