Skip to main content
Glama

Manawa Terminal

Cancel portfolio order

cancel_order
Destructive

Cancel an open portfolio order. No fill is written.

Args:
    portfolio_id: The portfolio UUID
    order_id: The order UUID

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": {
      "portfolio_id": "<portfolio_id>",
      "order_id": "<order_id>"
    },
    "name": "cancel_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
order_idYes
strategy_idNoStrategy this call belongs to. UUID from list_strategies. The card this call writes keeps that id. Omit when the call is not part of a strategy.
portfolio_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / strategy_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Strategy this call belongs to. UUID from list_strategies. The card this call writes keeps that id. Omit when the call is not part of a strategy.",
      +  "title": "Strategy Id"
      +}
  2. Added

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the safety profile is covered. The description adds a genuinely useful behavioral detail — 'No fill is written' — clarifying that cancellation does not produce a fill record. It stops short of stating irreversibility or permission requirements.

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 and the key side-effect ('No fill is written') in two short sentences. The trailing 'Args:' block is Python docstring boilerplate that partly duplicates schema titles, but it costs little.

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?

Output schema exists, so return values need not be explained, and annotations cover destructiveness. Still missing: the failure mode when the order is not open, and whether strategy_id must match the order's strategy. Adequate but with clear gaps for a destructive mutation.

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 only 33%, so the description must compensate. It does label portfolio_id and order_id as UUIDs, which the bare schema titles omit, but it silently ignores the optional strategy_id parameter, whose own schema description is the only documented one. Baseline 3 fits given partial compensation.

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?

States a specific verb and resource: 'Cancel an open portfolio order.' That is unambiguous and distinguishable from edit_order, though the description never names the sibling it is not (edit_order could also plausibly alter an order).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The word 'open' implies a state precondition (only open orders can be cancelled), which is the only usage guidance present. There is no explicit when/when-not, no mention of edit_order as the alternative for modifying an existing order, and no statement of what happens if the order is already filled.

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