Skip to main content
Glama
tronsave

TronSave MCP Server

Official

Cancel Order

tronsave_cancel_order
DestructiveIdempotent

Cancels an active order by orderId, marks it non-matchable, and refunds locked balance; use before fulfillment, since fulfilled or unauthorized orders fail.

Instructions

Cancel an open order by orderId. Returns { success, message, code }. Side effect: marks the order non-matchable and refunds locked balance per backend rules; effectively destructive on the live order. Idempotent — cancelling an already-cancelled order is a no-op success. Fails for fulfilled orders or unauthorized callers. Requires a wallet signature identity (the order's owner). Verify state with tronsave_get_order first; prefer tronsave_update_order when only price/receiver should change.

Input Schema

NameRequiredDescriptionDefault
orderIdYesTarget order id (`MObjectId`) to cancel. Must be an active order owned/authorized by the current session; already-fulfilled or already-cancelled orders are expected to fail.

Output Schema

NameRequiredDescriptionDefault
codeNoGraphQL mutation status code (HTTP-like; `0`/`200` indicates success). Always pair with `success` for routing.
messageNoHuman-readable status text. Populated even on success; localized error messages may appear here on failure.
successNoWhether the mutation succeeded at the backend level. Always check this before reading `data`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.4.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations, which already declare destructiveHint/idempotentHint: it explains that the order becomes non-matchable, locked balance is refunded per backend rules, cancelling twice is a no-op success, and that a wallet-signature identity of the order's owner is required. Nothing about side effects or preconditions is left implicit.

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 core action is front-loaded and each sentence carries actionable information (return shape, side effects, idempotency, failure modes, alternatives). It is dense and semicolon-packed but not padded; minor loss for the run-on density over a tighter list format.

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

Completeness5/5

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

For a one-parameter destructive mutation with an output schema present, the description covers preconditions, side effects, idempotency, auth requirements, and alternate tools. An agent has everything needed to call it correctly and safely.

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% and the schema already documents `orderId` as an MObjectId that must be an active, authorized order. The description restates 'open order by `orderId`' without adding format, sourcing, or validation detail beyond the schema, so 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?

States a specific verb and resource ('Cancel an open order by `orderId`') and implicitly scopes it to active orders, which separates it from `tronsave_update_order` and `tronsave_get_order`. An agent can identify the operation without opening the schema.

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?

Explicitly names prerequisites ('Verify state with `tronsave_get_order` first') and the alternative ('prefer `tronsave_update_order` when only price/receiver should change'), plus the failure cases (fulfilled orders, unauthorized callers). Routing guidance is complete.

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