Skip to main content
Glama

AIKIT by Trading Checkup

Review / audit trading bot code

check_bot_code
Read-onlyIdempotent

Use it when asked to review, audit, debug or sanity-check trading-bot source (Python ccxt/requests, Pine Script v5/v6, MQL5), together with your own reading: a fixed rule checker (not an AI, same answer every time) that returns each issue with its line number and exact fix lines for mistakes that are easy to miss when reading: order size not rounded to the venue lot step/min size (using sourced venue facts), no stop-loss or max-loss, look-ahead (unfinished candle or future data), ignoring fees, unhandled API errors/rate limits, hard-coded API keys (placeholder values such as 'your_key' or 'example' are skipped), unbounded order loops, testnet/live mix-ups. Known limit: look-ahead is traced inside one function; when the signal is computed in another function, check that by reading. A clean result does not prove a bot is safe or profitable. Code is checked in memory and not stored. 5 credits.

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": {
      "code": "<code>"
    },
    "name": "check_bot_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesThe full source of ONE bot file as plain text (up to 200 kB): Python (ccxt or REST/requests), Pine Script v5/v6, or MQL5/MQL4. Send the whole file, not a snippet, so order, stop and error-handling logic can be traced. Checked in memory, not stored.
venueNoExchange or broker id, lowercase: binance (Binance), bitget (Bitget), bybit (Bybit), coinbase (Coinbase), gate (Gate), ibkr (Interactive Brokers), kraken (Kraken), kucoin (KuCoin), mt5 (MetaTrader 5 (broker patterns)), okx (OKX). Optional: the venue the bot trades on. When given, order sizes and prices in the code are also checked against that venue's verified tick size, lot step and minimum order. Call list_venues (free) to see what each one covers.
filenameNoOptional file name with extension, e.g. bot.py, strategy.pine or expert.mq5. Helps pick the language; otherwise it is detected from the code.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / code / description
      Added value: +"The full source of ONE bot file as plain text (up to 200 kB): Python (ccxt or REST/requests), Pine Script v5/v6, or MQL5/MQL4. Send the whole file, not a snippet, so order, stop and error-handling logic can be traced. Checked in memory, not stored."
    • addedInput schema / properties / code / maxLength
      Added value: +200000
    • addedInput schema / properties / filename / description
      Added value: +"Optional file name with extension, e.g. bot.py, strategy.pine or expert.mq5. Helps pick the language; otherwise it is detected from the code."
    • addedInput schema / properties / venue / description
      Added value: +"Exchange or broker id, lowercase: binance (Binance), bitget (Bitget), bybit (Bybit), coinbase (Coinbase), gate (Gate), ibkr (Interactive Brokers), kraken (Kraken), kucoin (KuCoin), mt5 (MetaTrader 5 (broker patterns)), okx (OKX). Optional: the venue the bot trades on. When given, order sizes and prices in the code are also checked against that venue's verified tick size, lot step and minimum order. Call list_venues (free) to see what each one covers."
  2. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description still adds substantial context: deterministic rule-based behavior, results returned with line numbers and exact fix lines, in-memory checking with no storage, a 5-credit cost, a stated limitation (look-ahead traced only within one function), and an explicit caveat that a clean result does not prove safety or profitability. It even discloses that placeholder keys like 'your_key' or 'example' are skipped.

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-loads the trigger clause and follows with the mechanism, issue list, limits, privacy and price in a logical order. The enumeration of checked mistake types is long and read as one dense sentence, but nearly every item earns its place by telling the agent what will be flagged.

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?

No output schema exists, so the description must carry return behavior, which it does (each issue with line number and exact fix lines) alongside cost, storage policy and a known detection limit. A slightly clearer statement of the response shape or what a clean result looks like would close the remaining gap.

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 100%, so the schema already carries parameter meaning for code, venue and filename. The description adds only indirect cues — 'using sourced venue facts' ties the venue param to verified tick size/lot step checks, and list_venues is offered as the way to inspect coverage — but does not add format or submission detail beyond the schema. Baseline 3 applies.

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?

States a specific verb set (review, audit, debug, sanity-check) and the exact resource (trading-bot source in Python ccxt/requests, Pine Script v5/v6, MQL5), then distinguishes the mechanism as 'a fixed rule checker (not an AI, same answer every time)'. That is enough for an agent to separate it from siblings like explain_trading_error or check_order.

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

Usage Guidelines4/5

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

Opens with an explicit trigger ('Use it when asked to review, audit, debug or sanity-check trading-bot source'), names the pairing with the agent's own reading, and points to list_venues (free) to inspect venue coverage for the optional venue parameter. It does not state when NOT to use it or name the sibling to prefer for narrower tasks such as a single order check or an error explanation.

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