Skip to main content
Glama

BotSpot: AI Trading, Backtests and Bots

Delete a strategy file

delete_file
DestructiveIdempotent

Deletes a file in a new immutable revision for any strategy owned by the authenticated user. Requires editHandle from get_file/list_files to prevent stale edits. main.py cannot be deleted. For the current attached/open strategy, omit strategyId and revisionId; pass explicit ids only for another owned strategy.

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>",
      "editHandle": "<editHandle>"
    },
    "name": "delete_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
editHandleYesOpaque edit handle returned by list_files or get_file. It replaces raw hash copying while preserving stale-write protection.
revisionIdNoBase revision ID to snapshot from. Omit with strategyId for the current attached/open strategy.
strategyIdNoBase strategy id. Omit with revisionId for the current attached/open strategy.
descriptionNoShown to the customer as "How your strategy works". One or two plain sentences on what the strategy now does, e.g. "Buys Apple after a 5% drop in a day and sells at a 10% gain." Write for the customer, not an internal change note.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / description / description
      Added value: +"Shown to the customer as \"How your strategy works\". One or two plain sentences on what the strategy now does, e.g. \"Buys Apple after a 5% drop in a day and sells at a 10% gain.\" Write for the customer, not an internal change note."
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and idempotentHint=true, but the description adds the crucial fact that the delete is written as a new immutable revision, so history is retained. It also explains the stale-write protection purpose of editHandle and the main.py exclusion, which are behavioral facts not present in 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?

Four sentences, front-loaded with the core action and scope, then the precondition, then the constraint, then the id-routing rule. No filler, though the final sentence is fairly dense and could be split for faster scanning.

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 five-parameter destructive mutation with no output schema, the description covers ownership scoping, required preconditions, a hard restriction, and conditional id handling. Combined with annotations covering the safety profile, an agent has everything needed to invoke it correctly.

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 description coverage is 80%, so most parameter meaning is already documented. The description still adds value by stating the coupled omission rule for strategyId and revisionId for the current strategy, and by framing editHandle as stale-edit protection rather than a raw hash. It does not mention the customer-facing 'description' parameter, but the schema documents that fully.

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 description opens with a specific verb and resource ('Deletes a file') and immediately scopes it to 'any strategy owned by the authenticated user'. It also states a hard constraint ('main.py cannot be deleted'), which distinguishes it from a generic file-delete and from the sibling delete_strategy / patch_file set.

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?

It gives explicit preconditions (requires editHandle from get_file/list_files) and a clear routing rule: omit strategyId and revisionId for the current attached/open strategy, pass explicit ids only for another owned strategy. It does not say when to use patch_file or replace_file instead of deleting, so it stops short of full alternative coverage.

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.