Skip to main content
Glama

cancel_order

Cancels a pending Upstox order by order ID, preventing execution before it is filled.

Instructions

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

Input Schema

NameRequiredDescriptionDefault
order_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.8/5.0
Behavior2/5

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

With no annotations present, the description carries the full burden of behavioral disclosure and does not meet it. It does not say whether cancellation is irreversible, whether permissions or an active session are required, what happens to a partially filled order, or what the call returns on success or failure. For a destructive mutation on a trading system, those omissions are significant.

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?

The single sentence is front-loaded and free of waste, so it is not verbose. But the brevity comes at the cost of substance rather than from efficient packing of information, making it under-specified for a mutation tool.

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

Completeness2/5

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

The tool is simple (one required parameter, no output schema, no nested objects), so it needs little, but the description still omits the outcome of the call and any error or precondition behavior. With zero annotations and zero schema coverage, an agent has almost nothing to reason about beyond the verb.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% for the single order_id parameter, so the schema supplies only a name and type. The description's phrase 'a pending order' merely restates that the identifier refers to an order, adding no format, source, or validity guidance beyond the schema.

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 a pending order') and adds a scope qualifier ('pending') that constrains which orders qualify. It does not distinguish itself from siblings like modify_order or exit_positions, but the action itself is unambiguous.

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 'pending' implicitly tells the agent this applies only to unfilled orders, which is genuine usage signal. However, there is no explicit statement of when to use this versus modify_order or exit_positions, and no mention of what to do when an order is partially filled or already executed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.