Skip to main content
Glama

Create Strategy (Chunked Upload)

tt_create_strategy_chunked

Chunked 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

NameRequiredDescriptionDefault
chunkYes
draft_idYes
chunk_indexYes
total_chunksYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Goes well beyond the annotations: it documents per-chunk replacement semantics, retry safety, 5-minute TTL/GC behavior, the CHUNK_* error taxonomy, and the intermediate {status: "chunk_received"} response shape. One gap: annotations declare idempotentHint=false, yet the text says retrying is 'safe' — it notes the draft is discarded on success but never warns that a retry after a successful create would start a fresh draft and risk a duplicate strategy.

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 WHEN TO USE, then a numbered PROTOCOL, then short labelled sections for Idempotency, TTL, and Errors — easy to scan and act on. It runs long (~380 words) and the all-caps 'YOU DO NOT NEED TO COMPRESS ANYTHING' paragraph is defensive and repetitive, though it carries a real constraint (clients that cannot execute code).

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-call stateful upload with no output schema, it supplies everything an agent needs: the sequencing loop, the terminal vs intermediate response shapes, the retry/failure recovery rule, TTL, and error codes. Nothing required to drive the chunk sequence correctly is missing.

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 0%, so the description must carry all four parameters — and it does, via the numbered protocol: draft_id as a caller-chosen uuid4 hex, chunk_index in 0..N-1, total_chunks as N, and chunk as an arbitrary slice capped at 100 KB. It also explains what content the `chunk` strings may hold (plain markdown, plain JSON, zlib or gzip, with or without base64), which the bare 'Chunk' schema title does not.

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: a chunked variant of create_strategy, scoped to strategies too large for one tool-call argument. It explicitly distinguishes itself from the sibling `tt_create_strategy(compressed_payload=...)` and names the exact threshold (~6 KB / ~10 KB encoded) at which each applies.

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?

A dedicated WHEN TO USE block states the condition for use, the condition for the alternative, and a concrete size heuristic (11+-Set books with full AST triples). It also tells the agent when NOT to use it (typical strategies under 6 KB encoded) and names the exact fallback tool.

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