Skip to main content
Glama

script_export

Read-onlyIdempotent

Export a cubicle.script to one self-contained Python file for backtesting.py (target backtesting), vectorbt or backtrader, with the cubicle exporter: the file carries its own Pine-exact indicators and the script's machine as the runner steps it, and its header names the script hash and the fill settings. A construct the target cannot express is refused and named (say which one, and that script_rehearse still runs the script). If the deck answers that the exporter is not installed, say so; never write an export by hand. Free.

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": {
      "script": "<script>",
      "target": "<target>"
    },
    "name": "script_export"
  }
}

Input Schema

NameRequiredDescriptionDefault
scriptYesthe cubicle.script YAML text (version 1 or 1.1)
targetYesthe backtester

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / script / description
      Previous value: -"the cubicle.script v1 YAML text"New value: +"the cubicle.script YAML text (version 1 or 1.1)"
    • changedInput schema / properties / target / description
      Previous value: -"the backtester or language"New value: +"the backtester"
    • changedInput schema / properties / target / enum
      Previous value: -[
      -  "backtesting.py",
      -  "vectorbt",
      -  "backtrader",
      -  "pine"
      -]New value: +[
      +  "backtesting",
      +  "vectorbt",
      +  "backtrader"
      +]
  2. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed), so the description adds the substance that matters here: the output is self-contained, carries Pine-exact indicators and the script's machine as runner steps, and its header records the script hash and fill settings. It also discloses the failure mode (refusal of inexpressible constructs) and the missing-exporter case. It does not say whether the file is written to disk or returned.

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?

The description is front-loaded with the verb, resource, and output, and every clause adds information about output contents, refusal behavior, or error handling, with no filler. However, the main sentence is a long run-on with heavy parenthetical nesting ('for backtesting.py (target backtesting)') that hurts readability.

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?

There is no output schema, so the description correctly explains what is produced: a single self-contained Python file with embedded indicators, runner steps, and a header naming the hash and fill settings. What it omits is the delivery mechanism (file path returned vs. file content), which matters for a tool whose artifact the agent is explicitly told not to hand-write.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and both parameters are required, so the schema already documents 'script' and the 'target' enum. The description adds only the mapping of the enum value 'backtesting' to 'backtesting.py' and the implicit version range of the YAML text; that is useful but marginal beyond the schema.

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 definition uses a specific verb and resource ('Export a cubicle.script to one self-contained Python file') and enumerates all three targets (backtesting.py, vectorbt, backtrader), so an agent can tell it apart from script_rehearse, script_validate, and script_explain without opening any schema.

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?

The definition gives real guidance on which path to take: if a construct cannot be expressed for the target, the export is refused and the specific construct is named, and script_rehearse should then be used instead. It also tells the agent what to say when the exporter is not installed and forbids hand-writing an export. It does not give general when-to-use versus when-not context for choosing among the three targets.

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.

Resources