Skip to main content
Glama
staccDOTsol

fomox402 — Last-Bidder-Wins on Solana

place_bid

Place a bid on a $fomox402 game round to become the head bidder. Handles the 3-leg x402 micropayment process internally, returning the bid transaction hash. Win if you remain head bidder when the deadline hits zero.

Instructions

Place a $fomox402 bid on a game round. Wins the round if you're still the head bidder when the deadline hits zero.

WHAT IT DOES: handles the full 3-leg x402 micropayment dance internally: leg 1: POST /v1/games/:id/bid → broker returns HTTP 402 with a fee nonce leg 2: POST /v1/x402/pay (broker signs the fee tx from your Privy wallet) leg 3: POST /v1/games/:id/bid with X-Payment header → broker submits the on-chain bid_token instruction

Caller sees one atomic action; on success returns the bid tx hash.

WHEN TO USE: any time you want to be the head bidder. Pick gameId from list_games, set amountRaw ≥ that game's effective_min (smallest legal bid), and call.

FEES: ~0.001 $fomox402 micropayment to the dev wallet (the x402 leg) plus the bid amount itself (which goes to the game vault and ratchets effective_min for the next bidder). Solana network fees ~0.00001 SOL/tx.

FAILURE MODES: bid_failed_402_no_nonce — broker returned 402 but no usable nonce (unusual) x402_pay_failed — your wallet couldn't cover the micropayment fee bid_failed_after_pay — fee landed but the bid was racing another bidder and they got there first; effective_min moved up bid_failed — non-402 error (validation, RPC, etc.)

RETURNS on success: { tx (Solana sig of the bid_token call), gameId, amountRaw, x402_paid (bool), x402_fee_tx? (sig of fee tx if paid), newDeadline, newEffectiveMin, isHead (true if you're now last bidder), keysIssued (always 1) }.

MINTS 1 KEY: every successful bid mints you one key on the round. Keys earn $fomox402 dividends from every later bid; consider holding rather than burning them unless the pot is mature.

RELATED: list_games (find target), get_game (verify deadline), claim_winnings, claim_dividend, play (auto-loop wrapper), burn_key (advanced).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gameIdYesRound to bid on. Get from list_games[].gameId. Bidding on a settled or non-existent round returns 404.
amountRawYesBid amount in raw atomic token units, as a base-10 string (string preserves full bigint precision; numbers can lose accuracy past 2^53). MUST be ≥ the round's current effective_min (see list_games or get_game). For the cheapest valid bid, use `effective_min`; for autonomous loops, use `effective_min + 1`.
api_keyNoBearer api_key (or env).
Behavior5/5

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

With no annotations, the description fully discloses behavior: details the 3-leg x402 micropayment dance, lists 4 failure modes with specific error names, describes the return object with all fields, and notes that each bid mints a key. This is comprehensive transparency.

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?

Well-structured with clear section headers (WHAT IT DOES, WHEN TO USE, FEES, FAILURE MODES, RETURNS, etc.). Information is front-loaded. However, the description is long; some sentences could be tightened without losing clarity.

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?

Given the tool's complexity, no output schema, and 3 parameters, the description is remarkably complete: it explains return values, failure modes, fees, side effects (minting keys), and relationships to sibling tools. Everything an agent needs to invoke correctly is covered.

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%, but the description adds value beyond schema: for amountRaw, it explains the rationale for using 'effective_min + 1' in loops and clarifies atomic units. For gameId, it repeats schema info but adds context. The api_key parameter is straightforward. Overall, adds meaningful nuance.

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 clearly states the tool's purpose: 'Place a $fomox402 bid on a game round.' It uses a specific verb ('Place') and resource ('bid on a game round'), and distinguishes from sibling tools by mentioning related tools like list_games and play.

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 'WHEN TO USE' section says 'any time you want to be the head bidder.' It provides clear prerequisites: get gameId from list_games and set amountRaw ≥ effective_min. It also lists related tools for alternatives, fulfilling the when-to-use vs. when-not-to criteria.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/staccDOTsol/staccbot-tg'

If you have feedback or need assistance with the MCP directory API, please join our Discord server