Skip to main content
Glama

Purchase Asset

purchase_asset
Destructive

Finalize the purchase of a paid marketplace asset. Requires a signed x402 payment payload from the buyer's wallet. First call get_payment_requirements to obtain the payment requirements, sign them with your EVM wallet, then pass the signed payload here. Returns the purchase receipt including a directDownloadUrl — you can GET that URL with your X-Aion-Key header to download the file immediately, no extra steps needed.

Input Schema

NameRequiredDescriptionDefault
uploadIdYesUpload ID of the marketplace asset to purchase.
paymentPayloadYesSigned x402 payment payload from the buyer's wallet.

Output Schema

NameRequiredDescriptionDefault
statusYesPurchase status — "settled" on success.
txHashYesOn-chain transaction hash, if available.
purchaseIdYesUnique purchase receipt ID.
downloadUrlYesPublic URL to download the purchased asset.
payerAddressYesWallet address that paid for the asset.
directDownloadUrlYesAuthenticated API endpoint for direct file download. GET this URL with your X-Aion-Key header to stream the file immediately after purchase.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare the destructive and open-world nature, but the description adds crucial context: this is a monetary purchase that consumes a signed x402 payload and returns a receipt plus download URL. It does not spell out irreversibility or error behavior (e.g., what happens if the payload is invalid or the asset is already owned), which keeps it from a 5.

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 tight sentences, front-loaded with purpose, then prerequisites, then post-purchase behavior. Every sentence carries actionable information with no restatement of the name or title.

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?

Despite the mutation, nested payload, and payment prerequisite, the description covers the full call sequence, payload origin, and immediate follow-up action. With an output schema present and annotations covering safety, it is complete enough for an agent to invoke correctly.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3. The description adds value by explaining where paymentPayload comes from (a signed x402 payload from the buyer's wallet, derived via get_payment_requirements) and what uploadId refers to, which is more than the schema alone conveys about the payload's origin.

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 (finalize purchase of a paid marketplace asset) and explicitly distinguishes itself from the prerequisite sibling get_payment_requirements. An agent immediately knows this is the payment-settlement step, not the requirements-fetch or download step.

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

Usage Guidelines5/5

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

Gives an explicit ordered workflow: call get_payment_requirements first, sign with the EVM wallet, then invoke this tool with the signed payload. It also tells the agent what to do afterward (GET the directDownloadUrl with X-Aion-Key), leaving no ambiguity about when this tool is the right one.

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