Skip to main content
Glama

Prepare a signable trade intent for the agent wallet

problee_prepare_trade

Prepare a signable trade intent for the agent wallet. There is no transaction to broadcast: sign the returned signPayload.typedData and POST it to /trade/execute-intent, and the protocol submits it and pays the gas — an agent holds no ETH and manages no nonce. On a market whose settlement is committed the fill is paid at match in the venue ledger and recorded on Base in the next batch; a market whose settlement is onchain settles in its own transaction and its one-time approvals still apply.

Examples: Prepare a signable buy intent

Input Schema

NameRequiredDescriptionDefault
sideYes`side` = which OUTCOME (0-indexed: 0=outcome1,1=outcome2,2=outcome3), NOT buy/sell. Buy/sell is the direction field (`type`/`tradeType`/`action`/`direction`).
amountNoExact-input size. BUY: collateral spent. SELL: outcome tokens sold. Outcome tokens carry the market collateral's own denomination — one outcome token redeems for one collateral unit — so every outcome-token quantity uses that single unit: positions.outcome1Shares/outcome2Shares/outcome3Shares, SELL amount, 409 available/requested, and outcomeTokensOut/minOutcomeTokensOut. It is also the unit the signed intent carries, so nothing is converted between the wire, the engine and the calldata. Omit when using closePercent or targetCollateralOut.
chainIdNo
tradeTypeYesTrade DIRECTION (buy/sell). Note: this same concept is named `kind` (0=buy/1=sell int) on /orderbook/* and `side`/`action`/`tradeType`/`type`/`direction` on other trade endpoints — see skill.md field-map.
proofNonceNoRequired single-use nonce for the wallet proof. Fetch from POST /api/auth/nonce; consumed on verification so the proof cannot be replayed.
slippageBpsNo
closePercentNoSELL only. Percent (1–100) of the wallet’s current position in `side` to sell; 100 closes it fully. Server sizes from the live on-chain balance. Mutually exclusive with amount and targetCollateralOut.
marketAddressYes
walletAddressYesWallet that will sign/broadcast the trade
idempotencyKeyYesRequired write-safety key; reuse it unchanged when retrying this preparation
walletSignatureNoAction-bound wallet proof. Sign the canonical 'problee-mcp-auth:…' challenge (binds agent, apiKey, tool, scope, chain, resource, payloadHash, nonce, timestamp).
signatureTimestampNoUnix timestamp (seconds) used in the signed challenge message
targetCollateralOutNoSELL only. Size the sell so its net proceeds reach ~this much collateral (wei); server sizes from the live balance. Mutually exclusive with amount and closePercent.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

Beyond the annotations it discloses genuinely useful behavior: no gas and no nonce management for the agent, the settlement difference between committed-settlement markets (venue ledger at match, recorded on Base next batch) and onchain-settlement markets (own transaction, one-time approvals still apply). That is real context the annotations (readOnlyHint=false, destructiveHint=false, openWorldHint=true) do not carry. It does not mention idempotency/retry behavior in the prose, which is left entirely to the schema.

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 tightly written sentences, front-loaded with the purpose and the key 'no transaction to broadcast' constraint. The trailing 'Examples: Prepare a signable buy intent' adds no information and slightly dilutes an otherwise efficient definition.

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 13-parameter preparation tool with an output schema (so signPayload need not be explained) and annotations covering safety, the description supplies the missing behavioral layer: what happens after signing, who pays gas, and how settlement differs by market type. The only absent piece, preconditions like proofNonce/approvals, is already described in the schema properties.

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 77%, so the schema largely documents the 13 parameters itself, including the side/tradeType and amount/closePercent/targetCollateralOut distinctions. The description adds nothing at the parameter level — no guidance on side encoding, sizing, slippageBps, or the required signature fields. Baseline 3 is appropriate.

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 first sentence names a specific verb and resource: prepare a signable trade intent for the agent wallet. The following sentences carve out the boundary that matters most against problee_execute_trade_intent — nothing is broadcast from here, the caller signs and POSTs elsewhere. It stops short of naming the sibling tools directly (execute_trade_intent, prepare_trades_batch, simulate_trade), so an agent must infer the routing.

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?

It gives a clear downstream workflow (sign signPayload.typedData, then POST to /trade/execute-intent), which implies when this step is used. It never says when to prefer this over problee_simulate_trade, problee_get_quote, problee_prepare_trades_batch, or problee_place_limit_order, and it names no preconditions such as needing a proofNonce or one-time approvals first. Usage is therefore implied rather than stated.

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.