Skip to main content
Glama

BotSpot: AI Trading, Backtests and Bots

Create a strategy file

create_file
Destructive

Creates a file in a new immutable revision for any strategy owned by the authenticated user. For the current attached workspace, omit strategyId and revisionId. When create_strategy attaches the workspace through conversationUpdate, these defaults also apply to new first-build files. If creation returned no conversationUpdate, copy the exact returned strategyId/revisionId pair. Provide exactly one of content or attachment. For user-requested exact upload import, use attachment: {messageId, attachmentId} from attachments(action="list"); the server preserves original UTF-8 bytes and returns size/hash evidence. Read the new file back with get_file. Do not invent unavailable upload contents or import files without user intent. Use only for files that do not already exist; do not use this to update main.py or requirements.txt after create_strategy. Use replace_file for replacing an existing file and patch_file for small exact edits. 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. Use paths like lib/helpers.py or data/symbols.csv for folders. Default to the active strategy unless the user explicitly asks 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>"
    },
    "name": "create_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
contentNo
attachmentNoExact original upload to import instead of model-transcribed content. Use only when the user requested this import.
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 so the server uses the conversation's latest saved revision.
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. Changed6 schema fields changed
    • addedInput schema / properties / revisionId / $ref
      Added value: +"#/properties/strategyId"
    • changedInput schema / properties / revisionId / description
      Previous value: -"Base revision ID to snapshot from"New value: +"Base revision ID to snapshot from. Omit with strategyId for the current attached/open strategy."
    • removedInput schema / properties / revisionId / format
      Removed value: -"uuid"
    • removedInput schema / properties / revisionId / type
      Removed value: -"string"
    • addedInput schema / properties / strategyId / description
      Added value: +"Base strategy id. Omit with revisionId for the current attached/open strategy so the server uses the conversation's latest saved revision."
    • changedInput schema / required
      Previous value: -[
      -  "strategyId",
      -  "revisionId",
      -  "path"
      -]New value: +[
      +  "path"
      +]
  4. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Adds substantial context beyond the annotations: writes land in an immutable revision, the server preserves original UTF-8 bytes and returns size/hash evidence, and defaults come from conversationUpdate or the returned strategyId/revisionId pair. It does not explain why destructiveHint=true applies to an additive create, nor any auth or rate-limit behavior, so it stops short of full disclosure.

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 purpose and alternatives, and nearly every sentence carries actionable detail with little redundancy. It is dense and reads as a single block of many concerns, which costs some scannability, but nothing is plainly filler.

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 6-parameter, nested-object mutation tool with no output schema, the description covers creation semantics, defaulting, input-source rules, read-back via get_file, and sibling routing. The remaining schema-documented field (customer-facing description) is already well explained in structured data.

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?

Goes well past the 67% schema coverage: it states the "exactly one of content or attachment" rule that the schema does not enforce, explains the attachment pair's provenance via attachments(action="list"), and gives concrete path examples (lib/helpers.py, data/symbols.csv). This is meaning an agent could not derive from the schema alone.

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?

Opens with a specific verb and resource: "Creates a file in a new immutable revision for any strategy owned by the authenticated user." It immediately distinguishes itself from replace_file and patch_file and scopes ownership to the authenticated user, so an agent can select it without opening the schema.

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?

Explicitly covers when to omit strategyId/revisionId, when to use attachment versus content, when NOT to use it (updating main.py or requirements.txt after create_strategy, files that already exist), and names the correct alternatives (replace_file, patch_file). It also sequences plan-driven work via update_plan_item before file tools.

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.