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

TableJSON 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
    • 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."
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond annotations, the description explains critical behavioral details: IOC execution, slippage cap relative to oracle, reduceOnly, and the distinction between broadcast acceptance and actual fill. It warns about using confirmation.outcome vs code. This adds significant value.

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?

The description is efficient, with each sentence serving a purpose. It front-loads the key action ('Place an IOC market order') and logically proceeds to details on slippage, reduceOnly, and outcome handling. No unnecessary content.

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?

Despite no output schema, the description explains the return value (confirmation) and its fields, including outcome types and how to interpret them. It covers the complexity of IOC orders and potential edge cases, making it complete for usage.

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% (4/7 parameters have descriptions). The description adds meaning by explaining the default slippageBps (500) and how it works relative to side, and that reduceOnly closes an existing position. It does not add much for clientId or confirm but compensates for the gaps.

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 places an IOC market order, detailing the slippage cap and side-specific behavior. It distinguishes itself from sibling tools like place_limit_order by specifying the market order execution type.

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?

The description provides guidance on when to use this tool (IOC market order) and how to handle outcomes (retry with larger slippage if unfilled/partially_filled, wait if pending). It lacks explicit comparison to alternative order types but the context is strong.

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