Skip to main content
Glama

prepare_buy_lottery_tickets

Lowline Lottery: prepare (unsigned) buying tickets for the current round with $ZENI: an exact-amount approve (only if your allowance is short), then the buy. Amounts are in whole $ZENI, price read live from the contract. Pass count, and optionally number (0 to range minus 1, see lottery_info) to put all tickets on one number; leave it out and the contract picks. Refused when sales are closed or paused, the wallet cap is reached or the wallet cannot afford it. You sign and send it yourself.

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": {
      "wallet": "<wallet>",
      "count": "<count>"
    },
    "name": "prepare_buy_lottery_tickets"
  }
}

Input Schema

NameRequiredDescriptionDefault
countYesHow many tickets (at least 1, up to the per wallet cap in lottery_info).
numberNoOptional: the ticket number, from 0 to range minus 1. Omit for contract picked numbers.
walletYesYour own 0x wallet address. Nothing is sent from it; it is used to read your balance, allowance and tickets held, and to simulate.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so well: it discloses that the output is an unsigned transaction the caller must sign and send, that an exact-amount approve is included only when the allowance is short, that amounts are whole $ZENI, that price is read live from the contract, and that the call is refused under four named conditions. That is unusually complete behavioral disclosure for a write-path tool.

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 text is front-loaded with the action and scope, then moves to parameters, then to failure conditions and the signing step, so an agent can stop reading at any point with what it needs. The parenthetical '(only if your allowance is short)' and 'price read live from the contract' are compact and load-bearing. A few clauses, such as restating the number range already in the schema, could be trimmed.

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?

There is no output schema and no annotations, but the description covers the essentials: what is produced (an unsigned transaction), what the caller must do next (sign and send), and the refusal modes. It stops short of describing the returned object's shape or whether the approve is a separate transaction, which would be helpful for a multi-step prepare tool, but nothing critical is missing.

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%, so all three parameters are already documented in the schema, including the optional `number` and the read-only nature of `wallet`. The description restates the same semantics (count vs. optional number, contract-picked when omitted) without adding meaningfully new information beyond what the schema provides. Baseline 3 is correct here.

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 description states a specific verb, resource and scope: it prepares an unsigned purchase of lottery tickets for the current round using $ZENI, including the conditional approve step. This is clearly distinguishable from the many sibling prepare_buy_* tools, which cover different assets.

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?

It explains how to call it (pass `count`, optionally `number`) and points at the sibling `lottery_info` for the valid number range and per-wallet cap. It also lists the conditions under which the call is refused (sales closed, paused, cap reached, insufficient funds), which effectively tells the agent when not to use it. It does not explicitly contrast itself with any other buying path, but the context is still clear.

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