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 to use the active revision or latest saved revision of strategyId.
strategyIdNoStrategy id (or exact owned strategy name). Omit for the current attached/open strategy; omitting revisionId resolves the latest saved revision.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / revisionId / anyOf
      Previous value: -[
      -  {
      -    "$ref": "#/properties/strategyId/anyOf/0"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "format": "uuid",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / revisionId / description
      Previous value: -"Revision id. Omit only for the current attached/open strategy when the MCP token is scoped to an active strategy revision."New value: +"Revision id. Omit to use the active revision or latest saved revision of strategyId."
    • changedInput schema / properties / strategyId / anyOf
      Previous value: -[
      -  {
      -    "format": "uuid",
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "maxLength": 200,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / strategyId / description
      Previous value: -"Strategy id. Omit only for the current attached/open strategy when the MCP token is scoped to an active strategy revision."New value: +"Strategy id (or exact owned strategy name). Omit for the current attached/open strategy; omitting revisionId resolves the latest saved revision."
  2. Changed5 schema fields changed
    • removedInput schema / properties / revisionId / $ref
      Removed value: -"#/properties/strategyId"
    • addedInput schema / properties / revisionId / anyOf
      Added value: +[
      +  {
      +    "$ref": "#/properties/strategyId/anyOf/0"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / strategyId / anyOf
      Added value: +[
      +  {
      +    "format": "uuid",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / strategyId / format
      Removed value: -"uuid"
    • removedInput schema / properties / strategyId / type
      Removed value: -"string"
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the readOnly, idempotent, and non-destructive annotations, it discloses that the response includes an opaque editHandle, that the server can resolve the active revision from conversation state or the MCP token, and that edits produce a contentHash with a new editHandle and revisionId. It also warns not to re-read after saving or reuse the original revisionId.

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 selection rules are front-loaded, but the description runs very long and embeds cross-tool workflow for plan updates, first builds, automatic backtests, and copy/apply requests. Much of that guidance is useful, but it makes the definition heavier than a single file-read tool needs.

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?

For a file-read tool with no output schema, the description is complete enough: it explains the returned file and editHandle, the ID-resolution fallback, and the flow into replace_file or patch_file. It also covers missing optional files and named-strategy disambiguation.

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?

Although the schema documents strategyId and revisionId at 67% coverage, the description adds substantial meaning: path may be an optional file returned by list_files or a known entrypoint, and the two ID parameters should be omitted for the current strategy but supplied for a different named strategy. It also explains the fallback to the latest active revision.

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 a specific verb and resource: it returns one file from a saved strategy revision owned by the authenticated user, and it mentions the editHandle. It clearly distinguishes itself from siblings such as list_files, replace_file, and patch_file.

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?

The description gives explicit when-to-use rules: call list_files first for optional or unknown files, read known entrypoints directly, omit strategyId/revisionId for the current strategy, and resolve named targets with list_strategies/list_revisions. It also states when not to reuse a revisionId and when to read source/target files for copy or apply requests.

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.