Skip to main content
Glama

Create Strategy

tt_create_strategy

Create a new Tradetron strategy template from markdown or JSON, or copy an existing one server-side (copy_from_strategy_id).

TO COPY A STRATEGY: pass copy_from_strategy_id (and optionally copy_name), nothing else. Do NOT fetch the body with tt_get_strategy and send it back: on a large strategy that is 100+ KB of arguments. The copy is validated like any create; to move it to another underlying afterwards, use tt_apply_strategy_patch on the new id.

Pipeline: emit (if markdown) → validate locally → POST to TT.

Returns the new strategy's id and edit_url. The user then opens the edit_url in Tradetron's Advanced Strategy Builder to review and deploy.

STRONGLY RECOMMENDED: call tt_validate_markdown(text) FIRST to catch validation errors before paying for the network round-trip. Local validation is free and immediate; server-side rejection is slower and burns wallet. Pass the dry_run_token it returns here — the server confirms this exact spec was dry-run-validated (dry_run_verified).

For LARGE strategies (>20 KB JSON, common for multi-Set books), use compressed_payload instead of text_or_json.

*** ONLY USE THIS IF YOU CAN EXECUTE CODE. *** base64(gzip(...)) cannot be WRITTEN, only COMPUTED — producing it by hand means deriving byte-exact DEFLATE output and a CRC32 in your head. If you do not have a code-execution tool, pass the strategy as markdown or JSON in text_or_json, or — for one too large for a single tool argument — split that PLAIN JSON across tt_create_strategy_chunked, which accepts it uncompressed. Guessing at this argument fails 100% of the time; it was 25 failed creates in 14 days before this warning existed.

If you CAN execute code:

import base64, gzip, json
compressed_payload = base64.b64encode(
    gzip.compress(json.dumps(strategy_dict).encode())
).decode()

Why it exists: tool-call arguments are emitted as LLM output tokens, and a 100 KB strategy JSON (~60 K tokens) exceeds any per-turn budget. Gzip+base64 shrinks the same content to ~15 KB encoded. Pass exactly ONE of the two arguments; the server rejects ambiguous input.

The server is TOLERANT of near-miss encodings — zlib instead of gzip, base64 with the compress step skipped, or raw JSON — and will read them and warn rather than fail your create. It cannot read a fabricated string.

Set dry_run=True to build + validate and return the EXACT would-be create payload WITHOUT saving to TT — for inspecting/diffing the emitted JSON. The response carries a dry_run_token you can pass back here to perform the real create — good for 30 minutes, and for that exact spec; an expired one is reported, not refused.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "tt_create_strategy"
  }
}

Input Schema

NameRequiredDescriptionDefault
dry_runNoBuild and validate, return the would-be payload, and do NOT save to Tradetron.
copy_nameNoName for the copy (with copy_from_strategy_id). Default: 'Copy of <source name>'.
source_videoNoONLY when building from tt_read_strategy_video: {video_id, strategy_index, answers: {field: {kind: answer|confirm|leave_out, value?}}, trace: [{element, field}]}. The create is refused while any gap is unanswered, an inferred rule is unconfirmed, the trace cites a left-out rule or skips an in-force one, or a time differs from the video. Omit for strategies that don't come from a video.
text_or_jsonNoThe strategy, as markdown (preferred) or a JSON string. REQUIRED unless you pass compressed_payload — supply EXACTLY ONE of the two. This is the argument you want in almost every case.
dry_run_tokenNoToken returned by tt_validate_markdown for this exact spec; proves it was dry-run validated. Optional, and good for 30 minutes. An OLDER token does not block the create — the spec is validated inline either way — it just reports dry_run_verified: false with dry_run_status 'expired'. A token minted for a DIFFERENT spec, or a forged one, IS refused.
compressed_payloadNobase64(gzip(json)) of the strategy, for very large books. ONLY usable if you can EXECUTE code to produce it — it cannot be written by hand. Leave empty and use text_or_json otherwise. Supply EXACTLY ONE of the two.
copy_from_strategy_idNoCOPY an existing strategy server-side: its template id (or a deployment id, resolved to its template). The server reads it and creates the copy, so you send no body: leave text_or_json and compressed_payload empty. Only strategies this account can read. Use dry_run=true first to see the validation. 0 = not a copy.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only declare this is a non-readonly, non-idempotent, non-destructive write; the description goes far beyond by disclosing the pipeline (emit → validate → POST), the return payload (id and edit_url), 30-minute dry_run_token lifetime with 'expired is reported, not refused' semantics, and the server's tolerance for near-miss encodings versus fabricated strings. It also warns that guessing compressed_payload failed 25 times in 14 days, which is exactly the kind of operational hazard annotations cannot express.

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?

Well front-loaded with headers, an explicit copy recipe, and the validate-first recommendation placed early. It is long, and some content is redundant — the 'ONLY USE THIS IF YOU CAN EXECUTE CODE' warning appears twice, and several paragraphs restate what the schema property descriptions already say — which keeps it out of the top band despite the high value density.

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 7-parameter mutation tool with no output schema, nothing material is missing: it explains what gets created, where the user goes next (edit_url in Advanced Strategy Builder), the dry-run round-trip, and the failure modes (ambiguous arguments, expired token, fabricated compressed payload). Complexity is fully matched by disclosure.

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?

Schema description coverage is already 100%, so the baseline is 3, but the description adds real meaning: 'Pass exactly ONE of the two arguments; the server rejects ambiguous input' for text_or_json vs compressed_payload, a rationale (token-budget arithmetic, 100 KB ≈ 60 K tokens) for why gzip+base64 exists, and the constraint that copy mode sends no body at all. The code snippet for producing compressed_payload is information the schema cannot carry.

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+resource ('Create a new Tradetron strategy template') and immediately enumerates the three modes: markdown, JSON, or server-side copy via copy_from_strategy_id. An agent can distinguish this from tt_update_strategy, tt_apply_strategy_patch, or tt_validate_markdown without reading 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?

Explicit routing: 'STRONGLY RECOMMENDED: call tt_validate_markdown(text) FIRST', copy path must not fetch the body and instead uses tt_apply_strategy_patch afterward for moving underlyings, and tt_create_strategy_chunked is named as the fallback for oversized plain JSON. Each alternative comes with the condition that selects it.

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