Skip to main content
Glama

Magma buy

magma_buy
DestructiveIdempotent

Get the user's confirmation before paying. This call costs 1 sat ≈ $0.0008 from the credit balance. Amboss Magma issues the Lightning invoice and handles the order. Amazap does not pay the invoice or return that payment. A retry of the same node, amount, and flags returns the same invoice.

Input Schema

NameRequiredDescriptionDefault
usd_centsYesLiquidity amount in US cents. At least 500.
connection_uriYesNode pubkey or pubkey@host:port. The node that will receive the channel.
private_channelNoAsk Magma for an unannounced channel.
rails_cluster_onlyNoAsk Magma to use Rails cluster sellers only.

Output Schema

NameRequiredDescriptionDefault
codeNoapproval_required, limit_exceeded, or insufficient_balance.
paidNo
whichNoper_call, per_day, per_session, per_hour_buys, per_minute_calls, or per_minute_sats.
statusNo
messageNo
quoteIdNo
resultsNoSearch rows when this is a search result.
totalCostNo
totalSatsNo
approvalUrlNoPage where the person approves this exact price.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.2/5.0
Behavior4/5

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

Beyond annotations, it discloses cost (1 sat from credit balance), that Amboss Magma issues and handles the invoice/order, that Amazap does not pay or return payment, and that retrying the same node/amount/flags returns the same invoice. This is useful behavioral context, though it does not fully explain the destructive/credit-spending implications beyond cost and confirmation.

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?

The description is compact and front-loads the confirmation requirement, followed by cost, order handling, non-payment, and idempotency. Each sentence carries relevant information, though the phrasing is somewhat choppy.

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?

Given the output schema, full parameter descriptions, and annotations, the description covers the key call context: confirmation, cost, invoice handling, non-payment by Amazap, and retry idempotency. It still lacks sibling differentiation and a clear statement of the purchased resource, but it is largely sufficient for invocation.

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 the schema already documents all four parameters. The description adds only indirect meaning by mentioning 'same node, amount, and flags' for idempotency, without adding syntax or format details beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explains parts of the payment/order flow and mentions Magma issuing a Lightning invoice, but it never explicitly states that the tool buys channel liquidity or inbound capacity. The resource is only inferable from the title, schema field 'usd_cents' described as liquidity amount, and surrounding siblings like magma_liquidity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

It gives the prerequisite 'Get the user's confirmation before paying,' but does not say when to choose this over sibling tools such as buy, buy_best, quote, or magma_liquidity. There is no when-not guidance or alternative routing.

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.

Resources