Skip to main content
Glama
Derive MCP Server

Derive MCP Server

by yashhsm

place_order

Submit limit or market buy/sell orders for options or perpetuals with automatic EIP-712 signing and receive an order ID and status; confirm fills afterward for IOC/FOK orders.

Instructions

Place an order. Handles EIP-712 signing automatically. Returns order_id and order status. IMPORTANT: For IOC/FOK orders, the order may already be filled or cancelled by the time you read the response. Use get_order(order_id) after placing to confirm fill status, filled_amount, and average_price. MARGIN RULES: Selling/shorting options requires margin. On Standard Margin (SM), short options are treated as NAKED — the full margin is required even if you hold a protective long leg. SM does NOT recognize spreads. Credit spreads (bull put, bear call) ONLY work on Portfolio Margin (PM/PM2). Before selling options: 1) check margin_type via get_subaccount, 2) simulate the sell leg ALONE via get_margin, 3) if SM, only sell options if you have enough margin for naked exposure. Buying options only requires the premium — no additional margin needed. INSTRUMENT CONSTRAINTS: Check minimum_amount and amount_step via get_instruments before placing. Common minimums: ETH options 0.1, BTC options 0.01, SOL options 0.1, HYPE options 1.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "instrument_name": "<instrument_name>",
      "direction": "<direction>",
      "amount": "<amount>",
      "limit_price": "<limit_price>"
    },
    "name": "place_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
labelNoOptional label
amountYesOrder amount (in contracts)
max_feeNoMaximum fee willing to pay (USDC)100
directionYesOrder direction
order_typeNoOrder typelimit
limit_priceYesLimit price (in USD)
reduce_onlyNoReduce-only order
time_in_forceNoTime in forcegtc
instrument_nameYesInstrument (e.g., ETH-PERP, ETH-20260320-3000-C)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so: it discloses the automatic EIP-712 signing step, the return payload, the IOC/FOK fill race condition, that SM treats short options as naked and does not recognize spreads, that credit spreads require PM/PM2, and that buying requires only premium. These are non-obvious operational constraints an agent would otherwise get wrong.

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-loaded with the core action and return values, then organized into labeled sections (IMPORTANT, MARGIN RULES, INSTRUMENT CONSTRAINTS) so the agent can scan to what it needs. The margin block is lengthy and heavily capitalized, but each sentence carries actionable constraints rather than 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?

There is no output schema, and the description compensates by naming the returned fields (order_id, status) and pointing to get_order for fill status, filled_amount, and average_price. Combined with the margin and instrument preconditions, nothing material an agent needs to place an order correctly is missing.

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%, so baseline is 3, and the description earns above it by attaching real meaning to specific fields: per-instrument minimum and step values apply to amount (ETH 0.1, BTC 0.01, SOL 0.1, HYPE 1), and direction ('sell') carries margin consequences depending on margin_type. It adds no clarity on label, reduce_only, max_fee, or when to choose market vs limit order_type.

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?

Opens with a specific verb+resource ('Place an order') and adds what the agent cannot infer elsewhere: EIP-712 signing is handled automatically and the call returns order_id plus order status. It does not, however, distinguish itself from the sibling place_and_verify, so an agent cannot tell from this text which of the two placement tools to pick.

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?

Strong pre- and post-call guidance: check margin_type via get_subaccount, simulate with get_margin, check minimum_amount/amount_step via get_instruments, and re-read the order with get_order after IOC/FOK placement. It states concrete when-to-do-what conditions rather than leaving them to inference, but never names an alternative placement tool or when not to use this one.

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