Skip to main content
Glama

BotSpot: AI Trading, Backtests and Bots

Read and manage broker orders

broker_orders
Destructive

Read current orders through a saved broker connection, or request cancellation/modification of one exact owned order. Management always requires a fresh website approval and never places a replacement trade. Read the returned broker state after execution; a pending cancellation is not a canceled order.

Set "action" to choose the operation. Only send the fields listed for that action.

action="list": Get broker orders

No other fields required. Read-only: fetches current or recent broker orders directly from a saved broker credential. Use symbol, statuses, startTimeIso, and endTimeIso to narrow. Never pass raw broker credentials.

action="manage": Cancel or modify an existing broker order

Required fields: brokerCredentialId, orderId, operation, reason. HIGH RISK: request website approval to cancel or modify one exact order on a saved broker connection. Read current broker orders first and copy the native orderId and selected brokerCredentialId, plus the order row's symbol and assetType so only that market is read again (some exchanges, such as Phemex, list open orders one market at a time). The server binds the returned contract and side. operation=cancel takes no changes. operation=modify takes changes.limitPrice, stopPrice and/or quantity; quantity means the new total including fills already received, when the broker supports it. Use only changes the user requested and provide a reason of at least 200 characters explaining the action, evidence and remaining risk. Reuse the same idempotencyKey for a retry of the same request. A pending approval or completed worker is not proof of cancellation or a fill. After approval check the action status and refresh broker orders; fills can win cancellation races. Never place a replacement trade to emulate modification. For Codex, Claude, Cursor, and other clients without BotSpot native confirmation cards, return the exact authorizationUrl as a clickable Markdown link in your reply. Do not say a card or button was created unless the client actually rendered it. BotSpot clients may render structuredContent as a native confirmation, but a button name alone is not an approval link. A pending request is not execution; only the signed-in user may approve on the website. Report expiry and check get_deployment_action_status after approval.

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": {
      "action": "<action>"
    },
    "name": "broker_orders"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum orders to return (clamped to 1000). Used with action="list".
actionYesWhich operation to run: "list", "manage". See the tool description for each one.
reasonNoRequired explicit trade explanation: at least 200 Unicode characters; prefer 600–2,500 covering intent, evidence and material risks. Maximum 100,000 characters and 400 KiB UTF-8. Do not include credentials or hidden chain of thought. Used with action="manage". Required for action="manage".
statusNoSingle status filter alias for statuses. Used with action="list".
symbolNoUsed with action="list", action="manage".
changesNoUsed with action="manage".
orderIdNoUsed with action="manage". Required for action="manage".
outcomeNoSelected prediction contract outcome; Kalshi uses yes or no. Used with action="list".
statusesNoUsed with action="list".
assetTypeNoUsed with action="list", action="manage".
operationNoUsed with action="manage". Required for action="manage".
endTimeIsoNoUsed with action="list".
startTimeIsoNoUsed with action="list".
brokerProviderNoUsed with action="list".
idempotencyKeyNoUsed with action="manage".
brokerCredentialIdNoUsed with action="list", action="manage". Required for action="manage".

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / limit
      Added value: +{
      +  "description": "Maximum orders to return (clamped to 1000). Used with action=\"list\".",
      +  "exclusiveMinimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / status
      Added value: +{
      +  "description": "Single status filter alias for statuses. Used with action=\"list\".",
      +  "maxLength": 32,
      +  "minLength": 1,
      +  "type": "string"
      +}
  2. Changed2 schema fields changed
    • changedInput schema / properties / assetType / description
      Previous value: -"Used with action=\"list\"."New value: +"Used with action=\"list\", action=\"manage\"."
    • changedInput schema / properties / symbol / description
      Previous value: -"Used with action=\"list\"."New value: +"Used with action=\"list\", action=\"manage\"."
  3. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations declare destructiveHint=true and non-idempotent, and the description substantiates exactly why: website approval by the signed-in user, no replacement trade, pending cancellation is not a canceled order, fills can win cancellation races. It adds operational facts annotations cannot carry — idempotencyKey reuse on retry, expiry reporting, and that a rendered button name is not an approval link. No contradiction with the declared annotations.

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 choice between operations and organized under clear per-action headings, with the highest-risk warnings placed where the agent will hit them. It loses a point for genuine duplication: "never places a replacement trade" and "a pending cancellation is not a canceled order" are each restated later, and the client-rendering (Codex/Claude/Cursor) paragraph is long.

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 16-parameter, nested-object tool with destructive semantics and no output schema, this covers authorization, sequencing, idempotency, race conditions, and post-approval verification thoroughly. The remaining gap is return shape: it tells the agent to "read the returned broker state" but never describes what a list result contains, which matters since there is no output schema.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning beyond it: quantity means the new total including fills already received, changes/operation must reflect only what the user requested, and symbol/assetType exist partly to scope per-market open-order reads. The reason field's evidentiary purpose (intent, evidence, remaining risk) is also richer than the schema's length constraint, though the length rule itself is duplicated from the schema.

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?

The opening sentence names two specific verbs and resources (read orders, request cancellation/modification on one exact owned order) and explicitly bounds the scope of each. Per-action headers ("action=\"list\": Get broker orders", "action=\"manage\": Cancel or modify an existing broker order") make the two behaviors trivially separable 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?

Explicit routing is given for both actions, including the precondition that management requires first reading current orders and copying the native orderId and brokerCredentialId, plus symbol/assetType to narrow the market read on exchanges like Phemex. The description also names the follow-up tool (get_deployment_action_status) and the alternative that must not be used (placing a replacement trade to emulate modification).

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.