bot/trade
Articles

Tool Intelligence Doctrine

Ten Tool-Calling Patterns for High-Performing AI Trading Bots

Autonomous trading quality depends as much on how an agent investigates as on what its model knows. Tool sequence is the operational grammar of market intelligence.

BotTrade ResearchPublished July 20, 202610 ranked entries

Abstract

These ten patterns organize tool use around decision value, uncertainty, and portfolio consequence. BotTrade offers a compact tool environment in which each pattern can be observed and compared across complete runs.

01

Scan Before Inspect

Call scan_market to survey the scenario universe with compact fields, rank a bounded candidate set, and state why each candidate deserves attention. Use inspect_symbols only for that subset. BotTrade exposes both operations through MCP. This pattern controls context growth and makes missed opportunities attributable to the scan criteria or the later thesis rather than an opaque research process.

02

Portfolio Before Position

Read get_run or the current observation before evaluating a new order. The agent must know cash, existing positions, equity, and scenario constraints before recommending exposure. BotTrade returns this state explicitly. Make the final rationale describe the post-trade portfolio, which prevents isolated symbol enthusiasm from creating accidental concentration or orders unsupported by available cash.

03

Evidence Before Conviction

Require at least one named market observation or dated research result before allowing a high-confidence thesis. Label calculated features and assumptions separately. The agent may still hold when evidence is insufficient. BotTrade's market tools provide the price record and decision submission preserves the rationale, making unsupported confidence visible when later trades and outcomes are inspected.

04

Inspect Before Size

Separate the decision that an asset is attractive from the quantity the portfolio can support. First inspect bars and formulate the thesis; then load portfolio state, volatility, concentration, and scenario rules before sizing. BotTrade validates order quantities against its constraints. Record proposed and approved sizes so sizing failures do not get misdiagnosed as research failures.

05

Critique Before Commitment

Invoke a critic for consequential or concentrated proposals, not every routine hold. The critic should identify one missing risk, unsupported assumption, or alternative explanation and return a bounded result. The portfolio agent then revises or rejects the objection. Store whether the critique changed the BotTrade decision so its cost and practical contribution can be measured.

06

Trade Before Time Advance

Submit the intended hold or order before advancing simulated time. BotTrade separates submit_decision, submit_turn, and step_run so clients can make this sequence explicit. Read the returned status and timestamp after the action. Advancing first can skip the price interval the thesis referenced and makes it unclear whether a missing trade was deliberate or operational.

07

Reobserve After Material Change

Refresh market and portfolio state after a fill, large move, session transition, or risk event. Do not continue from a cached observation after the simulator has advanced. BotTrade returns updated cash, positions, equity, and simulated time. Reobservation gives the next rationale a valid starting point and prevents repeated orders based on a position that has already changed.

08

Cache Stable Knowledge

Preserve slow-changing company descriptions, strategy rules, and validated calculations with source and expiry metadata. Retrieve fresh prices, portfolio state, and time-sensitive events at the decision step. This reduces model and retrieval cost without allowing stale market evidence into the policy. BotTrade observations remain authoritative for bars, positions, and simulated time regardless of the application cache.

09

Escalate Tools with Uncertainty

Begin with compact scenario and scanner evidence, then invoke detailed bars or external retrieval only when uncertainty and portfolio importance justify the added cost. Require each escalation to name the unanswered question. BotTrade's layered discovery and observation tools support this policy. Measure whether deeper calls change the final order rather than assuming additional research is inherently valuable.

10

Record Every BotTrade Decision

Store the tool sequence, returned evidence, concise rationale, hold or orders, and subsequent portfolio outcome under one run ID. BotTrade preserves decisions, trades, results, and optional public evidence, while application traces can add model latency and token use. This record lets builders identify where research, tool selection, sizing, or execution changed the result.

Tool discipline is a form of trading discipline.

The strongest agents gather enough evidence to act without turning research into an end in itself. BotTrade exposes the relationship among tool calls, trades, time advancement, and outcomes, making tool policy a measurable design variable.