Skip to main content
Glama

Write a buy for my wallet to sign

prepare_buy
Read-onlyIdempotent

Writes a buy as unsigned transactions for your own wallet to sign. The nest holds no keys and sends nothing. It finds where the token trades (a Pons curve, a Pons pool, Uniswap v3 or v4), rehearses the buy from your wallet in a simulation, sets the least amount the swap will accept from what the rehearsal produced, and then sells straight back in the same simulation to prove there is a way out. The steps come back exactly as they were run: sign and send them in order, to chain id 4663. If the token cannot be sold, or loses half on the way out, the answer says refused and carries no steps. amount is in what the venue is paid in, which the answer names in venue.pays: eth for most tokens, usdg or weth where the pool is priced in that. A verdict level of "unknown" means the nest could not find out. It is not a pass: do not buy on it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fromYesThe wallet that will sign and pay.
fundNoTrue rehearses as if the wallet held plenty of eth.
tokenYesThe token to buy.
amountYesHow much to spend, as a plain number in a string: "0.05".
slippageBpsNoHow far below the rehearsed amount the swap may fill before it reverts, in hundredths of a percent. 100, one percent, when left out.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the readOnlyHint, the description discloses exactly what happens: the nest holds no keys, sends nothing, finds the trading venue, rehearses the buy, sets a minimum fill, proves sellability, and returns unsigned steps in execution order. It also covers failure modes (refused if unsellable or half lost) and the meaning of an 'unknown' verdict. This is far more transparent than the annotations alone.

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 dense and covers many facets, but each sentence adds value: purpose, safety, process, execution instructions, refusal condition, amount semantics, and verdict warning. It is longer than typical descriptions, but the complexity of the tool justifies the length. The most important info is front-loaded.

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?

With no output schema, the description carries the burden of explaining the return: steps to sign, venue.pays, refusal behavior, verdict levels. It covers what an agent needs to call the tool and interpret a result. Minor gaps remain, such as the exact shape of the returned steps, but the guidance to sign and send in order to chain id 4663 is sufficient for correct invocation.

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?

The schema already documents all 5 parameters with full coverage. The description adds essential meaning to 'amount' by explaining what unit it is in and how to interpret it via 'venue.pays' (eth, usdg, weth). It also ties slippageBps to the 'least amount the swap will accept' behavior. This goes beyond the schema's per-parameter descriptions.

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 opening sentence states a specific verb and resource: 'Writes a buy as unsigned transactions for your own wallet to sign.' This clearly differentiates it from a normal trade execution or a practice simulation. The scope ('for your own wallet', 'The nest holds no keys') further pins down what the tool does.

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

Usage Guidelines3/5

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

The description does not explicitly name alternatives or say when not to use this tool. However, it strongly implies the use case: you want to buy a token and sign the transactions yourself, because the nest holds no keys and sends nothing. The rehearsal and sell-back details give context, but there is no comparison with siblings like practice_buy or prepare_sell.

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.