Skip to main content
Glama

reconcile_perp_order

Idempotent

Reconcile one Hyperliquid order from venue status and fills, then record the verified outcome durably; use it after unknown final states or accepted cancellations. Idempotent.

Instructions

[Capability: available_with_tier_gate; tier: mixed_runtime_policy; API: /api/v1/agent/futures/reconcile-order; authority: /api/v1/agent/status] 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. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations cover safety (readOnlyHint=false, destructiveHint=false, idempotentHint=true), but the description adds real substance beyond them: it defines what idempotency means here ('replaying it re-records the same evidence instead of double counting fills'), states the evidence source, and rules out a tempting wrong inference ('Execution is never inferred from portfolio or balance deltas'). It stops short of describing response shape, error modes, or auth requirements, which keeps it at 4.

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 behavioral core is front-loaded and each sentence carries information (scope, evidence basis, side-effect boundary, idempotency semantics, invocation trigger). The bracketed capability/tier/API path prefix is internal metadata with limited decision value for an agent, which is the main deductible.

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?

With no output schema, the description still conveys enough to call the tool safely: what is read, what is written, and that it is replay-safe. The notable gap is what the call returns (reconciliation outcome, mismatch handling), which an agent would want for a tool whose whole job is confirming final state.

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 all six parameters are already documented in the schema, and the baseline is 3. The description adds no parameter-level meaning beyond reinforcing 'one order at a time'; it does not clarify the agentAddress vs accountAddress distinction, when intentHash is needed, or what controlActionId changes in behavior.

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?

Names a specific verb and resource with explicit cardinality: 'Reconcile ONE Hyperliquid order from direct venue evidence (order status plus user fills) and record it durably.' It also delineates itself from write-path siblings by stating 'Signs nothing, submits nothing,' so an agent can separate it from execute_perp_order without opening schemas.

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?

Gives concrete triggering conditions: 'Call this after any order whose final state is unknown, and after cancel_perp_order reports accepted.' The second clause names a specific sibling and the exact state that routes to this tool, leaving nothing to inference about when to prefer it.

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

Deploy Server

Other Tools