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. Changed8 schema fields changed
    • addedInput schema / properties / description / anyOf
      Added value: +[
      +  {
      +    "maxLength": 2000,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / description / maxLength
      Removed value: -2000
    • removedInput schema / properties / description / type
      Removed value: -"string"
    • 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"
  2. 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."
  3. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructive=true, idempotent=true and openWorld=true, so the bar is lower; the description still adds the important non-obvious behavior that deletion happens 'in a new immutable revision' (i.e., the change is versioned, not a raw file unlink) and that editHandle exists to prevent stale edits. It does not describe any permission failure modes beyond ownership.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three dense sentences, front-loaded with the action and scope, then constraints, then the parameter-selection rule. No filler or restatement of the title.

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?

For a destructive mutation with no annotations gap and no output schema, the description covers the important semantics: revision-based deletion, handle requirement, protected path, and id selection. It stops short of saying what the caller gets back (e.g., a new revision id), which matters for chaining follow-up calls, but that is a minor gap.

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 coverage is 80%, so baseline is 3; the description adds real meaning by explaining why editHandle is required (stale-write protection) and by stating the omission rule for strategyId/revisionId tied to the currently attached strategy. It does not mention the optional 'description' parameter's customer-facing purpose, which the schema itself already documents well.

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 and resource ('Deletes a file') plus scope ('for any strategy owned by the authenticated user') and an explicit hard restriction ('main.py cannot be deleted'). An agent can distinguish this from delete_strategy or replace_file because the resource is a file inside a strategy, not the strategy itself.

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?

Gives concrete prerequisites ('Requires editHandle from get_file/list_files') and an explicit rule for when to omit versus pass strategyId/revisionId. It does not name an alternative tool for deleting an entire strategy, leaving that routing to the sibling name alone.

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.