flash_cancel_order
Cancel a resting order (limit/twap/trigger). Signs the cancel message with your funder wallet. Requires the funder private key for the order's chain.
This record as markdown: /tools/definitive-fi-flash-mcp/flash-cancel-order.md
What flash_cancel_order does on Flash
AI agents call flash_cancel_order to permanently remove resources in Flash, typically in cleanup and lifecycle workflows. It does its job in a single call, and there is no undo.
| Parameter | Type | Required | Description |
|---|---|---|---|
chain | string | Yes | The chain the order is on (selects which wallet signs) |
orderId | string | Yes | The order id to cancel |
Parameters from the server's own tool schema.
Why flash_cancel_order is rated Critical
This tool cancels orders, which is an irreversible operation that destroys/removes existing financial orders from the system. While superficially it might appear as Write (modifying state), the cancellation of a resting order cannot be undone—once cancelled, the order is gone. Combined with the Financial context (trading orders), this is Destructive.
From the tool's definition Tool name: flash_cancel_order. Description states it 'Cancel[s] a resting order' and 'Signs the cancel message with your funder wallet.' Requires private key access. The tool irreversibly cancels existing financial orders.
Attacks that exploit this kind of access
The rule that runs flash_cancel_order safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Flash, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For flash_cancel_order, this is the rule to start with:
flash_cancel_order is removed from the agent's tool list entirely, so the agent never calls it. The rest of the server keeps working.
The button opens the PolicyLayer dashboard: create your workspace, connect Flash, apply this rule, and every flash_cancel_order call is checked against it from then on.
Questions about flash_cancel_order
Cancel a resting order (limit/twap/trigger). Signs the cancel message with your funder wallet. Requires the funder private key for the order's chain. It is categorised as a Destructive tool in the Flash MCP Server, which means it can permanently delete or destroy data. Block by default and require explicit approval.
flash_cancel_order accepts 2 parameters: chain, orderId. Required: chain, orderId. The full parameter table on this page comes from the server's own tool schema.
Register the Flash MCP server in PolicyLayer and add a rule for flash_cancel_order: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Flash. Nothing to install.
flash_cancel_order is a Destructive tool with critical risk. Critical-risk tools should be blocked by default and only enabled with explicit human approval.
Yes. Add a rate_limit block to the flash_cancel_order rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for flash_cancel_order. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
flash_cancel_order is provided by the Flash MCP server (@definitive-fi/flash-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Flash, and thousands of servers like it.
Across the catalogue