Skip to main content
Glama

BotSpot: AI Trading, Backtests and Bots

Save and manage your custom Python indicators

indicators
Destructive

Save, version, read, list and delete your own custom Python indicators (LumiBot Indicator classes). Before writing custom chart source, load the custom-chart-indicators reference. Use from lumibot.indicators import Indicator, InputSpec, OutputSpec (and Level when needed), the sandbox-supported API. If asked to change a chart before creating or adding an indicator, confirm the chart change before saving the indicator; then add the saved indicator to that same chart. action="create" saves version 1; action="update" with full source saves a new version and keeps old ones, so a bot pinned to a version keeps it; action="get" returns the code (newest, or a pinned version or revisionId); action="revisions" lists versions; action="delete" previews unless confirm is true. action="attach" pins your own or unlocked Marketplace indicators to a strategy revision (strategyRevisionId, indicators: full list) so its backtests and bots can use them. Indicators are private: only the owner can read or change the code. Only the signed-in person can use this tool.

Set "action" to choose the operation. Only send the fields listed for that action.

action="create": Save a new custom indicator

Required fields: name, source. Saves a new custom Python indicator (a LumiBot Indicator class) to the signed-in person's account as version 1. It starts private. Indicators are private: only the owner can read or change the code. Nobody else can read or edit it, including anyone it is shared with or sold to later. Use indicators(action="update") to save changes as a new version.

action="update": Save a new version of a custom indicator

Required fields: indicatorId. Saves changed source as a new version of one of the signed-in person's indicators. Old versions are kept unchanged, so a bot pinned to an older version keeps running it. Send the full source plus changeNotes. To only rename or change the description, leave source out (no new version is made). Indicators are private: only the owner can read or change the code. Nobody else can read or edit it, including anyone it is shared with or sold to later.

action="get": Read a custom indicator and its code

Required fields: indicatorId. Returns one of the signed-in person's indicators with its Python source: the newest version, or a pinned version by number or revision id. Source is returned to only the owner; any other id answers not found.

action="list": List your custom indicators

No other fields required. Lists the signed-in person's own custom indicators (name, id, newest version, visibility). Never shows code.

action="revisions": List the versions of a custom indicator

Required fields: indicatorId. Lists every saved version of one of the signed-in person's indicators, newest first, with what changed. Never shows code; read a version with indicators(action="get").

action="delete": Delete a custom indicator

Required fields: indicatorId. Deletes one of the signed-in person's indicators. Without confirm: true it only previews what will be deleted. Deletion is a soft delete: saved versions are kept and staff can restore them.

action="publish": List your indicator on the marketplace

Required fields: indicatorId. Lists one of your saved indicators on the BotSpot marketplace, or updates its listing. Visitors see what it draws on a live preview chart; buyers (anyone, when free) can add it to their charts. sourceVisibility "private" (default) keeps the code yours: buyers run it but never read it. "open" shows the code to everyone. pricingModel "free" (default) or "monthly" with priceAmountCents (100 to 1,000,000).

action="unpublish": Take your indicator off the marketplace

Required fields: listingId. Takes one of your indicator listings off the marketplace. The indicator itself stays saved.

action="marketplace": Browse indicators on the marketplace

No other fields required. Lists indicators on the BotSpot marketplace with their creator, price and link. creator filters to one creator by handle (as in botspot.trade/community/) or account id. Never returns code.

action="attach": Use custom indicators in a strategy

Required fields: strategyRevisionId, indicators. Pins custom indicators to one of your strategies so its backtests and bots can use them, each at one saved version. Send the full list you want attached (an empty list removes them all). Each item is an indicator id or chart key (custom-) and an optional version; without a version the newest one you may run is pinned. You may attach your own indicators and Marketplace indicators you unlocked (at the version the creator lists now). This saves a new strategy revision with the same files; running bots keep their revision until updated. In strategy code use self.indicators.get("", asset, version=, ...). The code of another creator is never shown.

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": {
      "action": "<action>"
    },
    "name": "indicators"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoA short name the person will recognize. Used with action="create", action="update". Required for action="create".
queryNoUsed with action="marketplace".
titleNoThe listing title. Defaults to the indicator name. Used with action="publish".
actionYesWhich operation to run: "create", "update", "get", "list", "revisions", "delete", "publish", "unpublish", "marketplace", "attach". See the tool description for each one.
sourceNoThe full Python source of the indicator: a LumiBot Indicator class. Send the whole file, not a diff. Used with action="create", action="update". Required for action="create".
confirmNoSet true to delete after showing the preview. Used with action="delete".
creatorNoUsed with action="marketplace".
versionNoA version number to read. Used with action="get".
metadataNoOptional. What the indicator declares: settings (name, type, default, description), outputs, placement ("overlay" draws on the price chart, "pane" in its own pane) and dataNeeds. Used with action="create", action="update".
listingIdNoThe listing id from indicators(action="publish") or the marketplace. Used with action="unpublish". Required for action="unpublish".
indicatorsNoThe complete list of custom indicators this strategy uses. Used with action="attach". Required for action="attach".
revisionIdNoA revision id to read. Used with action="get".
changeNotesNoWhat changed in this version, in plain words. Used with action="create", action="update".
descriptionNoaction="create": What the indicator shows. | action="publish": What it shows and how to use it. Used with action="create", action="update", action="publish".
indicatorIdNoThe indicator id from indicators(action="list"). Used with action="update", action="get", action="revisions", action="delete", action="publish". Required for action="update", action="get", action="revisions", action="delete", action="publish".
pricingModelNoUsed with action="publish".
priceAmountCentsNoUsed with action="publish".
sourceVisibilityNoUsed with action="publish".
strategyRevisionIdNoThe strategy revision to attach to (from list_revisions or get_strategy). Used with action="attach". Required for action="attach".

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / action / description
      Previous value: -"Which operation to run: \"create\", \"update\", \"get\", \"list\", \"revisions\", \"delete\", \"publish\", \"unpublish\", \"marketplace\". See the tool description for each one."New value: +"Which operation to run: \"create\", \"update\", \"get\", \"list\", \"revisions\", \"delete\", \"publish\", \"unpublish\", \"marketplace\", \"attach\". See the tool description for each one."
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "create",
      -  "update",
      -  "get",
      -  "list",
      -  "revisions",
      -  "delete",
      -  "publish",
      -  "unpublish",
      -  "marketplace"
      -]New value: +[
      +  "create",
      +  "update",
      +  "get",
      +  "list",
      +  "revisions",
      +  "delete",
      +  "publish",
      +  "unpublish",
      +  "marketplace",
      +  "attach"
      +]
    • addedInput schema / properties / indicators
      Added value: +{
      +  "description": "The complete list of custom indicators this strategy uses. Used with action=\"attach\". Required for action=\"attach\".",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "indicator": {
      +        "description": "Indicator id or chart key (custom-<id>).",
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "version": {
      +        "description": "Saved version to pin.",
      +        "minimum": 1,
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "indicator"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 20,
      +  "type": "array"
      +}
    • addedInput schema / properties / strategyRevisionId
      Added value: +{
      +  "description": "The strategy revision to attach to (from list_revisions or get_strategy). Used with action=\"attach\". Required for action=\"attach\".",
      +  "format": "uuid",
      +  "type": "string"
      +}
  2. Changed11 schema fields changed
    • changedInput schema / properties / action / description
      Previous value: -"Which operation to run: \"create\", \"update\", \"get\", \"list\", \"revisions\", \"delete\". See the tool description for each one."New value: +"Which operation to run: \"create\", \"update\", \"get\", \"list\", \"revisions\", \"delete\", \"publish\", \"unpublish\", \"marketplace\". See the tool description for each one."
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "create",
      -  "update",
      -  "get",
      -  "list",
      -  "revisions",
      -  "delete"
      -]New value: +[
      +  "create",
      +  "update",
      +  "get",
      +  "list",
      +  "revisions",
      +  "delete",
      +  "publish",
      +  "unpublish",
      +  "marketplace"
      +]
    • addedInput schema / properties / creator
      Added value: +{
      +  "description": "Used with action=\"marketplace\".",
      +  "maxLength": 80,
      +  "type": "string"
      +}
    • changedInput schema / properties / description / description
      Previous value: -"What the indicator shows. Used with action=\"create\", action=\"update\"."New value: +"action=\"create\": What the indicator shows. | action=\"publish\": What it shows and how to use it. Used with action=\"create\", action=\"update\", action=\"publish\"."
    • changedInput schema / properties / indicatorId / description
      Previous value: -"The indicator id from indicators(action=\"list\"). Used with action=\"update\", action=\"get\", action=\"revisions\", action=\"delete\". Required for action=\"update\", action=\"get\", action=\"revisions\", action=\"delete\"."New value: +"The indicator id from indicators(action=\"list\"). Used with action=\"update\", action=\"get\", action=\"revisions\", action=\"delete\", action=\"publish\". Required for action=\"update\", action=\"get\", action=\"revisions\", action=\"delete\", action=\"publish\"."
    • addedInput schema / properties / listingId
      Added value: +{
      +  "description": "The listing id from indicators(action=\"publish\") or the marketplace. Used with action=\"unpublish\". Required for action=\"unpublish\".",
      +  "format": "uuid",
      +  "type": "string"
      +}
    • addedInput schema / properties / priceAmountCents
      Added value: +{
      +  "description": "Used with action=\"publish\".",
      +  "type": "integer"
      +}
    • addedInput schema / properties / pricingModel
      Added value: +{
      +  "description": "Used with action=\"publish\".",
      +  "enum": [
      +    "free",
      +    "monthly"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / query
      Added value: +{
      +  "description": "Used with action=\"marketplace\".",
      +  "maxLength": 80,
      +  "type": "string"
      +}
    • addedInput schema / properties / sourceVisibility
      Added value: +{
      +  "description": "Used with action=\"publish\".",
      +  "enum": [
      +    "private",
      +    "open"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / title
      Added value: +{
      +  "description": "The listing title. Defaults to the indicator name. Used with action=\"publish\".",
      +  "maxLength": 140,
      +  "type": "string"
      +}
  3. Added

TDQS

A4.8/5.0
Behavior5/5

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

Goes well past the annotations: versioning is immutable ('Old versions are kept unchanged, so a bot pinned to an older version keeps running it'), delete is previewed unless confirm is true and is a soft delete staff can restore, get returns 'not found' for non-owned ids, and publish discloses default sourceVisibility and pricing bounds. This tells the agent the blast radius of each mutation, which the destructiveHint alone does not.

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-loaded with the action map and import guidance, then cleanly sectioned by action, which suits a 10-action/19-parameter tool. It loses a point for verbatim repetition — the 'Indicators are private: only the owner can read or change the code...' sentence appears three times, and the privacy point is also implied in the intro.

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 multi-action mutation tool with nested objects and no output schema, every action's inputs, side effects, and return shape (code vs metadata-only) are described. An agent has enough to choose an action and call it correctly on the first try.

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 100%, so the baseline is 3, but the description adds real meaning beyond the field docs: attach takes 'the full list' and 'an empty list removes them all', a missing version pins the newest runnable one, and each per-action section restates which fields are required. Minor gap: it never explains query/creator interplay for the marketplace action or how metadata interacts with parsed source.

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 set (save, version, read, list, delete) and a concrete resource (custom Python LumiBot Indicator classes), then enumerates all ten actions with a one-line gloss for each. An agent can distinguish create vs update vs attach vs publish 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?

Guidance is explicit per action: 'Use indicators(action="update") to save changes as a new version', 'To only rename or change the description, leave source out', 'Use from lumibot.indicators import ... the sandbox-supported API'. It also states a prerequisite (load the custom-chart-indicators reference before writing chart source) and a sequencing rule (confirm chart changes before saving, then attach to the same chart).

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.