Skip to main content
Glama
Derive MCP Server

Derive MCP Server

by yashhsm

place_and_verify

Place an order with automatic fill verification, classify expected errors, and record audit events to prevent phantom orders on failed or uncertain submissions.

Instructions

Place an order with automatic fill verification, error classification, and audit logging. Returns a LifecycleResult — never throws for expected failures (zero liquidity, insufficient funds). Submission states: 'accepted' (order on exchange), 'rejected' (exchange rejected), 'unknown' (transport error). For IOC/FOK that can't match, returns rejected with ZERO_LIQUIDITY — no phantom order created. For GTC that crosses the spread, returns filled with trades inline. All events are appended to the audit log.

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_and_verify"
  }
}

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
subaccount_idNoSubaccount ID (defaults to configured)
time_in_forceNoTime in forcegtc
instrument_nameYesInstrument (e.g., ETH-PERP, ETH-20260327-3000-C)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does so well: it declares the return type LifecycleResult<OrderReceipt>, states that expected failures do not throw, enumerates submission states (accepted/rejected/unknown), explains zero-liquidity handling with no phantom order, and notes audit logging. Gaps remain on permissions/authentication requirements, whether verification blocks or polls and for how long, and what an 'unknown' transport state implies for retry safety.

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?

The description is front-loaded with the purpose followed by return semantics and then edge-case behaviors, and every sentence contributes information. It is dense with jargon (LifecycleResult<OrderReceipt>, ZERO_LIQUIDITY) but that jargon is defined by context rather than wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 10-parameter mutation tool with no annotations and no output schema, the description does the important work of explaining return and failure semantics. It is still incomplete on auth/permission requirements, latency or polling behavior implied by 'verify', idempotency, and the market-order/limit_price interaction.

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 100%, so all ten parameters are already documented, and the description only adds behavioral meaning for time_in_force (IOC/FOK rejection versus GTC fill with inline trades). It says nothing about amount, limit_price, max_fee, reduce_only, subaccount_id, or label, and notably never addresses how a market order should treat the required limit_price field.

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 description uses a specific verb+resource ("Place an order") and adds the distinguishing scope of automatic fill verification, error classification, and audit logging, which separates it in spirit from the bare place_order/verify_order siblings. It never names those siblings, so the differentiation is inferred from the composite behavior rather than stated.

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 solid scenario guidance about what outcomes arise for IOC/FOK versus GTC orders, which helps an agent predict results. However, there is no statement of when to call this versus place_order, verify_order, or accept_rfq_quote, and no prerequisites or exclusions are given.

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