Skip to main content
Glama

FarmDash Agent OS

reconcile_perp_order

Idempotent

Reconcile ONE Hyperliquid order from direct venue evidence (order status plus user fills) and record it durably. Signs nothing, submits nothing, and is idempotent: replaying it re-records the same evidence instead of double counting fills. Execution is never inferred from portfolio or balance deltas. Call this after any order whose final state is unknown, and after cancel_perp_order reports accepted.

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": {
      "agentAddress": "<agentAddress>",
      "coin": "<coin>",
      "orderId": "<orderId>"
    },
    "name": "reconcile_perp_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
coinYesHyperliquid market symbol, for example ETH.
orderIdYesVenue order id to reconcile. Reconcile one order id at a time.
intentHashNoOptional lowercase 32-byte hex intent hash from the original preparation, when known.
agentAddressYesRecovered/verified L1 signer address that owns the order context.
accountAddressNoVenue-verified equity owner (master/subaccount) when agentAddress is a delegated API wallet.
controlActionIdNoOptional control-action id when reconciling a cancellation or protective order.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag idempotentHint=true and readOnlyHint=false, but the description earns credit by explaining the consequence ("replaying it re-records the same evidence instead of double counting fills") and by resolving the tension of a non-readOnly tool that mutates nothing at the venue. "Execution is never inferred from portfolio or balance deltas" is a non-obvious correctness rule an agent could not derive from annotations or schema.

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?

Three sentences, front-loaded with the action and its evidence basis, then the safety/no-side-effect guarantees, then the call trigger. No filler words and no restatement of the tool name.

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?

For a 6-parameter mutation-adjacent tool with no output schema, it covers the key unknowns: what is read, what is written, idempotency, and what must not be inferred. The remaining gap is that it never says what the caller gets back from a durable record operation, and controlActionId's cancellation/protective-order case is left entirely to the schema.

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 description coverage is 100%, so every parameter including agentAddress, accountAddress and controlActionId is already documented in the schema. The description reinforces the one-order-at-a-time cardinality but adds no syntax, format or dependency detail beyond what the schema supplies, so the baseline 3 applies.

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?

"Reconcile ONE Hyperliquid order from direct venue evidence (order status plus user fills) and record it durably" gives a specific verb, the exact resource, the evidence sources and the side effect. The emphasis on "ONE" plus the enumeration of what it does not do cleanly separates it from prepare_perp_order, execute_perp_order and cancel_perp_order.

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?

It states an explicit trigger condition: "Call this after any order whose final state is unknown, and after cancel_perp_order reports accepted," naming the sibling that hands off to it. It also implicitly excludes the sign/submit path by stating "Signs nothing, submits nothing," so the agent knows not to use it in place of execution tools.

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