Skip to main content
Glama

Tinplate Edge AI Safety, Security & EU Compliance

tinplate_rag_chunker

Read-onlyIdempotent

Markdown & Code Aware Smart RAG Document Chunker API: Split Markdown into token-budgeted RAG chunks with heading breadcrumbs and intact code/tables. (Endpoint: POST /v1/rag-chunker)

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": {
      "text": "<text>"
    },
    "name": "tinplate_rag_chunker"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesRaw Markdown, technical documentation, or prose document to split into semantic RAG chunks.
max_tokensNoTarget maximum token budget per chunk (default: 256).
overlap_tokensNoApproximate trailing token overlap carried into the next chunk within the same section (default: 24).
prepend_breadcrumbsNoPrepend the active Markdown heading breadcrumb path (e.g. '[Context: Guide > Auth]') to each chunk's 'text' field for embedding context.
split_on_heading_levelNoAlways start a new chunk when encountering a heading at or above this level (1 = H1, 2 = H1/H2).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. Changed18 schema fields changed
    • addedInput schema / properties / max_tokens / default
      Added value: +256
    • changedInput schema / properties / max_tokens / description
      Previous value: -"Numeric parameter 'max_tokens' (e.g. 128)"New value: +"Target maximum token budget per chunk (default: 256)."
    • addedInput schema / properties / max_tokens / maximum
      Added value: +8192
    • addedInput schema / properties / max_tokens / minimum
      Added value: +32
    • changedInput schema / properties / max_tokens / type
      Previous value: -"number"New value: +"integer"
    • addedInput schema / properties / overlap_tokens / default
      Added value: +24
    • changedInput schema / properties / overlap_tokens / description
      Previous value: -"Numeric parameter 'overlap_tokens' (e.g. 16)"New value: +"Approximate trailing token overlap carried into the next chunk within the same section (default: 24)."
    • addedInput schema / properties / overlap_tokens / maximum
      Added value: +1024
    • addedInput schema / properties / overlap_tokens / minimum
      Added value: +0
    • changedInput schema / properties / overlap_tokens / type
      Previous value: -"number"New value: +"integer"
    • addedInput schema / properties / prepend_breadcrumbs / default
      Added value: +true
    • changedInput schema / properties / prepend_breadcrumbs / description
      Previous value: -"Boolean flag 'prepend_breadcrumbs' (default: true)"New value: +"Prepend the active Markdown heading breadcrumb path (e.g. '[Context: Guide > Auth]') to each chunk's 'text' field for embedding context."
    • addedInput schema / properties / split_on_heading_level
      Added value: +{
      +  "default": 2,
      +  "description": "Always start a new chunk when encountering a heading at or above this level (1 = H1, 2 = H1/H2).",
      +  "maximum": 6,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • changedInput schema / properties / text / description
      Previous value: -"Parameter 'text' (e.g. \"# Gateway Manual\\n\\n## Authentication\\nPass your proxy secret h\")"New value: +"Raw Markdown, technical documentation, or prose document to split into semantic RAG chunks."
    • addedInput schema / properties / text / example
      Added value: +"# Edge Gateway Guide\n\n## Authentication\nAll API calls require a proxy secret header.\n\n```bash\ncurl -X POST https://api.tinplate.dev/v1/json-heal\n```\n\n## Rate Limits\n| Plan | Quota |\n| --- | --- |\n| Basic | 100 |\n| Pro | 10000 |"
    • addedInput schema / properties / text / maxLength
      Added value: +200000
    • addedInput schema / properties / text / minLength
      Added value: +1
    • changedInput schema / required
      Previous value: -[
      -  "text",
      -  "max_tokens"
      -]New value: +[
      +  "text"
      +]
  3. First observed

TDQS

B3.2/5.0
Behavior3/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-world). The description adds genuine behavioral detail beyond them — chunking is token-budgeted, breadcrumbs are injected, and code blocks/tables are kept intact — but it omits the response shape (a list of chunk objects), error behavior for oversized input, and any rate-limit context.

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?

Two compact clauses front-load the purpose and the key structural guarantees, with the endpoint tucked at the end. Minor waste in repeating the full API title that already appears in annotations.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description should say what the chunker returns; it only hints at a per-chunk 'text' field via the breadcrumb note. It is adequate for invoking the tool correctly but leaves the result shape and the 200k-character input ceiling to the schema.

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 description coverage is 100%, so every parameter is already documented, and 3 is the baseline. The description reinforces the intent behind max_tokens ('token-budgeted') and prepend_breadcrumbs ('heading breadcrumbs') but adds no semantics for overlap_tokens or split_on_heading_level beyond what the schema states.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Split Markdown into token-budgeted RAG chunks') plus the distinguishing traits (heading breadcrumbs, intact code/tables). It doesn't explicitly contrast with the sibling tinplate_tabular_rag_cleaner, so the agent must infer the Markdown-vs-tabular boundary from the resource noun alone.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The RAG-chunking framing implies when the tool applies, but there is no explicit when-to-use statement, no exclusion (e.g. non-Markdown or tabular input), and no pointer to the tabular sibling as an alternative. The agent gets context but no routing rule.

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