Skip to main content
Glama

FarmDash Agent OS

cancel_perp_order

Destructive

USER_SIGNED requires fresh human approval; BOUNDED_AUTONOMOUS requires futures.cancel scope, a valid owner-signed policy and authenticated session, but not unused entry budget. Local venue signatures are required in both modes. Cancel stale or resting Hyperliquid orders with a venue-signed expiresAfter and FarmDash intent hash. For a delegated API wallet, accountAddress identifies the verified equity owner and is included as the signed vault/subaccount routing address when required. accepted is an application acknowledgement, not final venue cancellation: reconcile every requested ID through /api/v1/agent/futures/reconcile-order before dependent actions. Mixed errors are partial rejection; malformed or timeout outcomes are unknown. Venue nonce authority is network + signer + nonce across account/vault contexts; durable replay control fails closed before submission.

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>",
      "orderIds": "<orderIds>",
      "signature": "<signature>",
      "nonce": "<nonce>",
      "expiresAt": "<expiresAt>",
      "intentHash": "<intentHash>"
    },
    "name": "cancel_perp_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
coinYes
nonceYes
grantIdNo
orderIdsYes
expiresAtYes
sessionIdNo
signatureYes
intentHashYes
agentAddressYes
sessionTokenNo
signedActionNo
executionModeNoUSER_SIGNED
accountAddressNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare destructive=true, idempotent=false and openWorld=true, yet the description adds substantive operational semantics beyond them: 'accepted' is an application acknowledgement rather than final venue cancellation, mixed errors indicate partial rejection, timeouts yield unknown state, and replay control fails closed before submission. These are exactly the failure-mode facts an agent needs for a non-idempotent destructive call. Docking one point because the nonce/authority sentence ('network + signer + nonce across account/vault contexts') is too compressed to act on.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Every sentence carries information, so nothing is pure padding, but the ordering is backwards: authorization-mode preconditions precede the statement of what the tool does. Several sentences are dense run-ons piling three or four clauses together ('BOUNDED_AUTONOMOUS requires futures.cancel scope, a valid owner-signed policy and authenticated session, but not unused entry budget'), which makes the critical accepted-vs-cancelled warning easy to miss.

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 13-parameter destructive tool with no output schema and zero schema descriptions, the description does address the highest-risk gaps: the accepted-is-not-final warning with a reconcile endpoint, partial-rejection semantics, and unknown-outcome handling. What it leaves incomplete is the parameter surface itself — session/grant credentials and the signature sub-object are unexplained — so an agent cannot construct a valid call from this alone.

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 0% across 13 parameters, so the description carries the burden, and it only partially does. It explains accountAddress (verified equity owner for a delegated API wallet, signed vault/subaccount routing address), executionMode, expiresAt, intentHash and nonce semantics. It says nothing about coin, orderIds bounds (1–50 IDs), grantId, sessionId, sessionToken, signedAction or signature, leaving seven parameters undocumented in either place.

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 third sentence states a specific verb and resource: 'Cancel stale or resting Hyperliquid orders with a venue-signed expiresAfter and FarmDash intent hash.' An agent can tell this apart from execute_perp_order or prepare_perp_order. The problem is placement — the actual purpose statement is buried behind two sentences of authorization-mode boilerplate, so the first thing an agent reads is not what the tool does.

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?

Gives explicit conditional guidance: USER_SIGNED requires fresh human approval, BOUNDED_AUTONOMOUS requires the futures.cancel scope, an owner-signed policy and an authenticated session but no entry budget. It also mandates a follow-up reconciliation step before dependent actions, which is real when-to-use guidance. Missing an explicit statement of when to prefer this over alternate cancellation paths, but the mode-selection rules are concrete.

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