Skip to main content
Glama

Place a market order

place_market_order

Place an IOC market order. It executes as an IOC limit at a worst-acceptable price mirrored around the oracle by side — BUY caps ABOVE the oracle, SELL below — at slippageBps distance (default 500 = 5%). Fills happen at book prices; the cap only limits how deep the sweep goes. reduceOnly closes an existing position. Returns confirmation with the REAL outcome verified via the indexer (filled / partially_filled / unfilled / pending): broadcast code: 0 only means the tx was accepted — an IOC order cancels UNFILLED when the book is entirely beyond the slippage cap (thin/spread market). Always report from confirmation.outcome, not code; if unfilled or partially_filled, retry with a larger slippageBps to sweep deeper; if pending, the indexer is lagging — wait a few seconds and re-check before concluding.

Input Schema

NameRequiredDescriptionDefault
sideYes
sizeYesSize in base units
marketYesMarket ticker, e.g. BTC-USD
confirmNoVerify the real fill via the indexer after broadcast (default true).
clientIdNo
reduceOnlyNo
slippageBpsNoMax slippage vs oracle, in bps (default 500). BUY bounds above the oracle, SELL below; raise to sweep a thin book.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / market / pattern
      Added value: +"^[A-Z0-9]{1,20}-[A-Z0-9]{1,20}$"
  2. Changed1 schema field changed
    • changedInput schema / properties / slippageBps / description
      Previous value: -"Max slippage vs oracle, in bps"New value: +"Max slippage vs oracle, in bps (default 500). BUY bounds above the oracle, SELL below; raise to sweep a thin book."
  3. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations (which only say non-readonly, non-idempotent, non-destructive). It discloses that IOC orders cancel UNFILLED, that broadcast code:0 only means acceptance not a fill, that fills occur at book prices with the cap limiting sweep depth, and that the authoritative result must come from confirmation.outcome.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Dense but front-loaded: the execution model comes first, then outcome semantics and retry logic. Every sentence adds actionable information with no filler.

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?

With no output schema, the description takes on the burden of explaining returns and does so thoroughly, detailing confirmation.outcome values and how to interpret each. An agent has everything needed to call and interpret this tool correctly.

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 57%, so the description carries real weight: it explains side-dependent cap direction, slippageBps default (500 = 5%) and its role in sweeping a thin book, and reduceOnly closing an existing position. It leaves confirm and clientId unelaborated, but the high-value parameters are covered.

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 (place) and resource (market order) and immediately pins the execution model: an IOC limit at a worst-acceptable price mirrored around the oracle by side. This distinguishes it from place_limit_order and other order-entry siblings without needing to open either schema.

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?

Gives operational guidance on what to do when the outcome is unfilled, partially_filled, or pending, which tells the agent how to act. However, it never explicitly contrasts with siblings like place_limit_order or open_position, so the choice of when to prefer this tool over alternatives is left implicit.

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.