Skip to main content
Glama
aibtcdev
by aibtcdev

ordinals_buy

Purchase a listed Bitcoin inscription from Magic Eden by requesting a buyer PSBT, signing it with an unlocked wallet, and broadcasting it to complete the transaction.

Instructions

Buy a listed inscription from Magic Eden.

Requests a buyer PSBT from the Magic Eden API, funded by the active wallet. Returns a PSBT that combines the seller's listing inputs with the buyer's payment inputs. The buyer signs the PSBT then broadcasts it to complete the purchase.

Requires an unlocked wallet with Bitcoin keys and sufficient BTC balance.

Steps:

  1. Call ordinals_get_listings to find an inscription and its price

  2. Call ordinals_buy with the inscriptionId and desired buyer address

  3. Sign the returned PSBT using psbt_sign

  4. Broadcast using psbt_broadcast

Tip: call earning_opportunities to see how to put your assets to work.

Input Schema

NameRequiredDescriptionDefault
feeRateNoFee rate in sat/vB (optional, uses network default if omitted)
buyerAddressNoBTC address to receive the inscription (defaults to wallet's Taproot address)
inscriptionIdYesInscription ID to purchase, e.g. abc123...i0
buyerPaymentAddressNoBTC address to fund the purchase (defaults to wallet's SegWit address)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.77.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the upstream dependency (Magic Eden API), that the call only builds and returns a PSBT rather than executing the purchase, that the buyer must sign and broadcast separately, and the wallet/balance prerequisites. It omits risk context such as what happens if the listing is taken or delisted, and whether fees beyond the feeRate are charged.

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?

Purpose, return behavior, prerequisites, and an ordered workflow are front-loaded and each earns its place. The trailing 'Tip: call earning_opportunities to see how to put your assets to work' is an unrelated promotional line that does not help invoke this tool.

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 an unannotated, no-output-schema mutation-adjacent tool, the description covers what is returned (a PSBT combining seller listing inputs with buyer payment inputs), the signing/broadcast path, and funding prerequisites. Network expectations and failure modes (listing no longer available, insufficient funds) are the main remaining gaps.

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% and every parameter (inscriptionId, buyerAddress, buyerPaymentAddress, feeRate) has its own documented default/format. The description only mentions inscriptionId and a 'desired buyer address', adding essentially nothing 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 and resource with venue: 'Buy a listed inscription from Magic Eden.' An agent can distinguish it from psbt_create_ordinal_buy, ordinals_p2p_create_offer, and ordinals_list_for_sale without opening any schema.

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?

Provides an explicit 4-step workflow naming the prerequisite tool (ordinals_get_listings) and the two follow-up tools (psbt_sign, psbt_broadcast), plus the condition 'requires an unlocked wallet with Bitcoin keys and sufficient BTC balance'. It never explicitly contrasts with the near-sibling psbt_create_ordinal_buy, so the alternative-selection guidance is incomplete rather than absent.

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

Deploy Server

Other Tools