Skip to main content
Glama

AlgoVesta MCP Trading

cancel_order

DestructiveIdempotent

Cancels a pending limit order. If order_ref does not belong to the user, NOT_FOUND is returned (no information about another user's order is disclosed). idempotency_key is REQUIRED: calling again with the same key returns the stored response. This is a RISK-REDUCING operation: the policy wall does not block it (except the kill switch).

list_open_orders shows the order_ref of each pending order.

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": {
      "venue": "<venue>",
      "order_ref": "<order_ref>",
      "idempotency_key": "<idempotency_key>"
    },
    "name": "cancel_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
venueYesExchange/venue name — must be one of the user's CONNECTED accounts (e.g. binance, bybit, okx, mt5, paper). A venue that is not connected is rejected with VENUE_NOT_CONNECTED.
order_refYesReference of the pending order to cancel (taken from list_open_orders). An order_ref that does not belong to the user returns NOT_FOUND.
idempotency_keyYesClient-generated unique idempotency key (min 8 characters). Reuse the SAME key when retrying the same action — the stored response is replayed and the action is NOT performed a second time.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: NOT_FOUND semantics for orders not owned by the user with the deliberate non-disclosure rationale, mandatory idempotency with stored-response replay, and the policy-wall interaction that decides whether the call will be blocked. The annotations cover destructiveness and idempotency hints, but the error and authorization behavior is only available here.

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 action, then failure semantics, then the idempotency requirement, then policy context — every sentence carries signal. Minor duplication with the schema's idempotency_key description is the only waste.

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 three-parameter mutation tool with no output schema, the definition covers authorization failures, retry safety and policy gating, which is most of what an agent needs. It does not say what a successful cancel returns, leaving the agent to discover the response shape (relevant given the verify_receipt sibling).

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 the schema already documents venue connectivity, order_ref provenance and idempotency-key reuse. The description restates the idempotency requirement and the NOT_FOUND ownership rule rather than adding new parameter meaning, so the baseline of 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?

"Cancels a pending limit order" states a specific verb, resource and scope (pending limit orders only), which distinguishes it from position-level siblings like close_position. It also names list_open_orders as the discovery path, so the agent can locate the target without opening another schema.

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?

Clear usage context: the description tells the agent to get order_ref from list_open_orders and notes this is a risk-reducing operation that bypasses the policy wall except for the kill switch. It stops short of explicit when-not guidance (e.g. use close_position for an already-filled position rather than cancelling the order).

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.