Create Strategy (Chunked Upload)
tt_create_strategy_chunkedChunked create_strategy for strategies larger than a single tool-call argument can carry.
WHEN TO USE: only when compressed_payload itself exceeds your model's
per-tool-arg output budget (~6 KB per string arg in some MCP
clients; varies by client). A 100 KB strategy JSON gzip+b64
encodes to ~10 KB, which mostly fits — but 11+-Set books with full
AST triples push past 10 KB encoded and need chunking. For typical
strategies (<6 KB encoded) use tt_create_strategy(compressed_payload=...)
directly.
YOU DO NOT NEED TO COMPRESS ANYTHING. PLAIN MARKDOWN (the same text
tt_validate_markdown / tt_create_strategy take, starting
# Strategy Spec — <name>) and PLAIN JSON split into chunks are both
accepted and read; so are zlib-instead-of-gzip and base64 with the
compress step skipped. Compression was only ever a token-budget
optimisation. tt_create_strategy routes a client that CANNOT execute
code here, so this tool must not then ask it to compute a
base64(gzip(...)) string — which it cannot do.
PROTOCOL (caller is the LLM): 1. Generate a unique draft_id (uuid4 hex is fine). 2. Take the strategy markdown or JSON. If you can execute code, you may compress JSON as for compressed_payload (fewer, smaller chunks); if you cannot, use the plain text as-is. 3. Split the string into N pieces of any size (each piece <=100 KB). 4. For each i in 0..N-1, call this tool with: draft_id=, chunk_index=, total_chunks=, chunk= 5. The last call (when the server has all N pieces) decodes, validates, and POSTs to TT — returns the strategy id + edit_url in the same shape as tt_create_strategy. 6. Earlier calls return {status: "chunk_received", ...} so you know progress without firing the create early.
Idempotency: resending the same (draft_id, chunk_index) replaces the
prior chunk silently. Safe to retry on transient network failures,
and safe after a FAILED assembly too — a draft whose last chunk did
not decompress, or assembled into a spec that failed validation,
keeps every chunk it had. Re-send only the chunk you are changing and
the assembly runs again; the failure response carries draft with
the current receipt count. The draft is discarded once the create
SUCCEEDS.
TTL: 5 minutes after the last chunk write. If you leave a draft half-uploaded the server GCs it.
Errors: distinct CHUNK_* codes per failure mode (invalid index, out of range, too many chunks, total mismatch, missing indices, per-chunk too large, assembled too large, too many active drafts).
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": {
"draft_id": "<draft_id>",
"chunk_index": "<chunk_index>",
"total_chunks": "<total_chunks>",
"chunk": "<chunk>"
},
"name": "tt_create_strategy_chunked"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chunk | Yes | ||
| draft_id | Yes | ||
| chunk_index | Yes | ||
| total_chunks | Yes |