Skip to main content
Glama

Buy from an OTC tier

dexe_otc_buyer_buy
Destructive

Buys tokens from an OTC TokenSaleProposal tier by preflighting balance and allowance, adding ERC20 approval when needed, and building or broadcasting the buy call.

Instructions

Broadcasts when a signer is configured. Preflights balance + allowance, adds an ERC20 approve when needed, then builds TokenSaleProposal.buy(tierId, paymentToken, amount, proof). Native path (0x000...000) skips approve and sets value; whitelistUsers generates the proof.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "tokenSaleProposal": "<tokenSaleProposal>",
      "tierId": "<tierId>",
      "tokenToBuyWith": "<tokenToBuyWith>",
      "amount": "<amount>"
    },
    "name": "dexe_otc_buyer_buy"
  }
}

Input Schema

NameRequiredDescriptionDefault
userNoBuyer address; defaults to the configured signer.
proofNoMerkle proof for a gated tier; [] when not gated.
amountYesAmount to spend: human units ('100.5'), or digits-only = 18-decimal-normalized.
dryRunNoIf true, return ordered TxPayloads even when a signer is loaded.
tierIdYesTier to buy from, decimal string.
chainIdNoTarget chain id. Defaults to the MCP's default chain.
signerKeyNoKeyring signer: omit = primary key; 'agent<n>' or address = a DEXE_AGENT_PK_* key.
simulateFirstNoeth_call-simulate buy() first; aborts with the revertReason if the sim fails.
tokenToBuyWithYesPayment token; native BNB = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE (0x0 is an alias).
whitelistUsersNoOptional whitelist for proof gen
tokenSaleProposalYesTokenSaleProposal helper address

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.37.1

TDQS

A3.9/5.0
Behavior5/5

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

Annotations already flag readOnlyHint=false and destructiveHint=true, yet the description adds genuinely non-obvious behavior: a balance + allowance preflight and an *extra ERC20 approve transaction* injected when needed, plus a native-token branch that skips approve and sets `value`. These are material side effects an agent could not learn from the schema alone, and they are consistent with the destructive annotation.

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?

Three dense sentences that front-load the execution pipeline and then the special cases, with no filler. The opening clause is slightly cryptic out of context (what is broadcast?), but the following clauses resolve it quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 11-parameter mutation that can emit two transactions, the description covers the transaction pipeline well but never says what a successful call returns (tx hash vs. payloads under dryRun) despite there being no output schema. An agent knows how the call flows but not what it gets back, leaving a real gap.

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 baseline is 3; the description still earns credit by explaining `whitelistUsers` actually drives proof generation and by describing how the native payment token short-circuits the approve step. Minor friction: it refers to the native path as 0x000...000 while the schema documents 0xEeeee... as native and 0x0 merely as an alias.

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

Purpose4/5

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

The description names the underlying action precisely: it preflights, approves if needed, then builds `TokenSaleProposal.buy(tierId, paymentToken, amount, proof)`, which pins down exactly what the tool does. It is less explicit about the verb at the agent level ("Broadcasts when a signer is configured" only implies the send-vs-build dichotomy) and never names a sibling to contrast with, so it stops short of a 5.

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?

Usage is implied rather than stated: the phrase "Broadcasts when a signer is configured" tells the agent that this sends a real transaction unless no signer is present, which nudges toward the dryRun path. There is no explicit when-to-use/when-not guidance and no routing to alternatives such as status or claim-all, so the agent must infer the conditions.

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