Skip to main content
Glama

Quick buy a token

quick_buy
Destructive

Buy a token in one step, without a separate quote. ⚠️ THIS SPENDS REAL MONEY. It submits a real transaction from the user's wallet using real funds and cannot be undone. Confirm the exact amount, token and network with the user in plain language, and get their explicit go-ahead, BEFORE calling this. Because there is no quote step, the user does not get to see a price before committing — so confirm the token AND the amount in words first, and prefer get_swap_quote + execute_swap whenever the user might want to see the price. Give exactly one of amount_usd or amount_in, never both. Verify the contract address came from search_tokens; buying an impostor token is unrecoverable.

Response includes quote_id; when fill_pending is true, call get_swap_status(request_id=quote_id).

AMOUNTS: read the _ui fields (whole tokens) when talking to the user — the un-suffixed output_amount / minimum_output_amount / filled_*_amount are in the token's SMALLEST unit. A null amount is unknown, never zero: fill_pending: true means the trade was submitted but its fill is not booked yet — say so, and read the received amount from get_swap_status rather than guessing it.

Moby attaches no exits: place this position's TP/SL yourself with create_order.

Input Schema

NameRequiredDescriptionDefault
networkNosolana
amount_inNoHow much to spend in whole units of USDC, the only funding asset — SOL is a position, never spent by a buy. Mutually exclusive with `amount_usd`.
rationaleNoOptional. Your 2–4 line thesis: why this coin, why now, who's in it, what breaks it. Stored with the trade and shown to the user; ≤500 chars.
amount_usdNoHow much to spend in US DOLLARS. Mutually exclusive with `amount_in`.
output_tokenYesContract address of the token to BUY. Get it from `search_tokens`.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare destructive=true and non-idempotent, but the description adds the details that matter: real funds are spent, it is irreversible, the user never sees a price because there is no quote step, and buying an impostor contract address is unrecoverable. It also discloses the `fill_pending` state and that a null amount means unknown, not zero.

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?

Front-loaded with the irreversible-spend warning, then alternatives, then amount conventions — a sensible priority order. It runs long and the AMOUNTS section partly restates what an output schema could carry, but almost every line is load-bearing guidance for a money-moving call.

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?

For a destructive, one-shot purchase with an output schema, the description covers the confirmation gate, the sourcing of the token address, the amount convention split (`_ui` vs smallest unit), the null/fill_pending ambiguity, and the missing-exits gotcha. Nothing an agent needs to avoid a harmful call is absent.

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 80% and already documents both amount fields and the USDC-only funding rule, so the mutual-exclusivity restatement adds little. The description does add real value by insisting the contract address originate from `search_tokens`, warning about impostor tokens, and clarifying that SOL is a position rather than a spendable balance.

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 ('Buy a token in one step, without a separate quote') and immediately distinguishes itself from the get_swap_quote + execute_swap path named later in the same paragraph. An agent can tell exactly what this tool does and how it differs from its closest sibling.

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?

Explicit routing: prefer `get_swap_quote` + `execute_swap` whenever the user might want to see the price, and confirm token/amount/network plus explicit go-ahead before calling. It also names a downstream follow-up (`get_swap_status(request_id=quote_id)` when `fill_pending` is true) and a post-trade obligation (`create_order` for TP/SL).

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