Skip to main content
Glama

Get a stateless exact-input trade quote

problee_get_quote
Read-onlyIdempotent

Get a stateless trade quote. Response is a discriminated union on kind: "amm" (LMSR) returns outcomeTokensOut for buys, collateralOutRaw for sells, prices after, fees; "orderbook" (CLOB markets) returns bestBid/bestAsk/spread/mid instead — there is no single LMSR price to quote against a resting book. /trade/quote is stateless exact-input pricing only. To price a position-relative closePercent sell or a targetCollateralOut exact-output sell, call /trade/simulate with the same body you would later send to /trade/prepare.

Examples: Quote buying outcome 1 with PM collateral; Quote an order-book (CLOB) market — returns book state, not an LMSR price

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`). Encoded here as the outcome label string ('outcome1'|'outcome2'|'outcome3'), not the 0-indexed TradeSide int used on REST /trade/* bodies.
actionYesTrade 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.
amountYesExact-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. /trade/quote is stateless exact-input pricing only. To price a position-relative closePercent sell or a targetCollateralOut exact-output sell, call /trade/simulate with the same body you would later send to /trade/prepare.
chainIdNo
marketAddressYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive/openWorld, so the safety profile is covered. The description adds real behavioral context beyond that: statelessness, exact-input-only pricing, and that the response is a discriminated union whose shape differs by market type (AMM returns outcomeTokensOut/collateralOutRaw/prices/fees; orderbook returns bestBid/bestAsk/spread/mid). It does not discuss failure modes (e.g. the 409 available/requested referenced in the schema) but the union semantics are a genuine addition.

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?

Front-loads the core purpose, then response shape, then the routing caveat, which is the right order. The trailing "Examples:" block largely restates the preceding sentences (the CLOB example is already covered by the union explanation), so a small amount of text does not earn its place.

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?

An output schema exists, so return values needn't be spelled out, yet the description still explains the union discriminant usefully. Statelessness, exact-input scope, and the alternative path are all covered. What is missing is any note on marketAddress/chainId selection or error behavior for a 5-parameter tool.

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 coverage is 60%, and the description adds only the "exact-input" framing for the amount parameter. The rich per-field semantics for side and action live in the schema, while chainId and marketAddress remain undocumented in both places. Baseline 3 is appropriate since the schema does most of the work.

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?

States a specific verb and resource ("Get a stateless trade quote") and immediately scopes it to exact-input pricing only. It further distinguishes itself from the simulate/prepare path by naming the operations it does not cover (closePercent sell, targetCollateralOut exact-output). An agent can tell this apart from problee_simulate_trade or problee_estimate_market_order without opening a schema.

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?

Explicitly routes the agent elsewhere: "To price a position-relative closePercent sell or a targetCollateralOut exact-output sell, call /trade/simulate with the same body you would later send to /trade/prepare." That is a concrete when-not condition plus the alternative. The only gap is that it names REST paths rather than MCP sibling tool names, requiring a small mapping step.

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.