Skip to main content
Glama

BotSpot: AI Trading, Backtests and Bots

Fetch a strategy revision file

get_file
Read-onlyIdempotent

Returns one file from any saved strategy revision owned by the authenticated user, including an opaque editHandle for safe edits. Call list_files before reading optional files such as rules.json or helpers whose presence is unknown; read only paths returned for that revision. A known entrypoint such as main.py can be read directly. Missing optional Rules do not block diagnosis and do not require creating a file. For the current attached/open strategy, omit strategyId and revisionId and pass only path so the server uses the latest active revision from conversation state, falling back to the MCP token, instead of making you copy UUIDs. Use explicit strategyId/revisionId only when the user named or identified another owned strategy. If the user says 'the one entitled X', 'apply this to X also', names a different bot/strategy, or says not to change the open strategy, resolve that named target with list_strategies/list_revisions first and pass its strategyId/revisionId here. Do not reuse the open/current page revisionId for a different named strategy; after list_strategies finds the target, call list_revisions for that named strategy and use the target revisionId returned there. For existing-strategy fixes or updates, this is the required bridge from inspection to action: read the file once to get its editHandle, then edit with replace_file (whole file, complete preserved content) or patch_file (exact copied text). A save result confirms the saved content (contentHash) and returns the next editHandle and revisionId; do not call get_file again to re-read it, and never reuse the original/base revisionId after an edit. Copy or apply requests: read both the source and the target, copy only the behavior the user asked for, and keep the target's own symbol, name and account. If the user said to stop using a value or source, a fallback to it still counts as using it. When the user disabled automatic backtests, a first build ends by updating the visible plan to wait on the user's backtest request, not by start_backtest or complete_plan. For plan-driven first-build work, make the visible implementation item in_progress with update_plan_item before using file tools so the user sees the current plan step while file work runs. For first-build strategy work, call create_strategy first. When create_strategy attaches the workspace through conversationUpdate, omit strategyId and revisionId: get_file needs only path and list_files needs no selectors. If creation returned no conversationUpdate, copy the exact returned strategyId/revisionId pair.

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": {
      "path": "<path>"
    },
    "name": "get_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
revisionIdNoRevision id. Omit only for the current attached/open strategy when the MCP token is scoped to an active strategy revision.
strategyIdNoStrategy id. Omit only for the current attached/open strategy when the MCP token is scoped to an active strategy revision.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already establish readOnly, idempotent, non-destructive behavior, but the description adds meaningful context: the opaque editHandle, the fallback to conversation state then MCP token, and that stale revisionId must not be reused after edits. It does not cover error cases such as missing paths or oversized files, and some workflow instructions are tangential to this tool.

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 core purpose and routing guidance are front-loaded, but the description expands into a long operational policy covering backtest gating, plan item updates, copy requests, and first-build sequencing. Much of that content is only indirectly relevant to get_file and makes the definition substantially longer than needed.

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

Completeness5/5

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

There is no output schema, so the description carries the return-value burden and does so by naming editHandle, contentHash, and the next editHandle/revisionId after a save. For a three-parameter read tool it covers invocation, targeting, and follow-up behavior thoroughly.

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

Parameters5/5

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

Schema coverage is 67%, and the description substantially extends the schema by explaining when to omit strategyId and revisionId, how the server resolves the active revision, and when explicit IDs are required for another owned strategy. It also clarifies path usage for known entrypoints versus files returned by list_files.

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 first sentence states a specific verb and resource — returns one file from a saved strategy revision — and immediately clarifies the editHandle output. It distinguishes list_files for optional files versus direct reads of known entrypoints like main.py.

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?

It gives explicit when-to-use rules: call list_files when optional file presence is unknown, read known entrypoints directly, omit strategyId/revisionId for the current attached strategy, and use explicit IDs only for a named target resolved via list_strategies/list_revisions. It also names replace_file and patch_file as the downstream actions.

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.