
datoon
io.github.andrii-suPublished by GitHub account andrii-suv1.9.1Updated Oct 24, 2026
Smart structured-data to TOON gateway: converts to TOON only when it saves LLM tokens.
Overview
Converts structured data such as JSON, CSV, or YAML into TOON format for LLM prompts, but only when the conversion actually saves tokens.
- What you can do
- datoon is a local MCP server that turns structured data into TOON, a compact tabular text format, before it goes into a prompt. It exposes three tools: convert_json for full JSON conversion with policy gating, convert_text for CSV, YAML, XML, or JSONL text, and analyze_json for structure analysis only. A decision layer checks whether the payload is a uniform object array with enough rows and whether estimated token savings clear a threshold; if not, it returns the original data. Every result includes a report with the decision, a reason, and token estimates.
- When to use it
- Use it when prompts carry large, uniform tabular payloads — CSV exports, JSONL event logs, or API responses — and you want to cut payload tokens without risking a conversion that makes things worse. It is also useful when you want an explicit, logged reason for each format decision in a pipeline.
- Requirements
- Runs as a local process, typically via uvx from the PyPI package datoon with the mcp extra. Requires Python 3.12 or newer. TOON conversion itself requires Node.js with npx on PATH; analysis and format reading work without it. Optional extras add YAML, Excel, Parquet/ORC/Avro, Apple Numbers, and tiktoken-based token counting. No accounts, API keys, or environment variables are declared.
Installation
In SourceWeft
- Open datoon in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
datoon
smart structured-data→TOON gateway — converts only when it actually saves tokens
[Tests] [Pre-commit] [Release] [PyPI] [Python] [License: MIT]
Before/After • Install • What You Get • How It Works • Benchmarks • Full install guide
Raw structured data is often verbose in LLM prompts. TOON can save tokens — but blind conversion can also make payloads worse. datoon adds a decision layer: convert when structure and savings justify it, skip when they don't, and always explain why.
Supports JSON, CSV, JSONL, YAML, XML, Parquet, Avro, ORC, Excel, and Apple Numbers — auto-detected from file extension.
Before / After
Same data. Right format. Always explained.
[!IMPORTANT] datoon saves payload tokens — the structured data portion of your prompt. Token savings depend on payload shape: uniform tabular data converts well; deeply nested or non-uniform structures are skipped. Every decision includes a reason so pipelines can log, debug, and trust the outcome.
Install
Requires Python 3.12+. TOON conversion requires Node.js with npx in PATH — analysis and format reading work without it.
For Claude Code plugin, Codex, and MCP config → INSTALL.md.
What You Get
Supported input formats
How It Works
- Detect format — from
--formatflag, file extension, or default to JSON for stdin - Read + normalize — parse source into list of row dicts; serialize to compact JSON
- Analyze structure — uniform object arrays? acceptable depth? minimum rows?
- Gate early — non-candidates skip before any CLI call; no Node.js overhead
- Convert + estimate — TOON CLI runs, token savings calculated
- Gate savings — below threshold → return JSON; above → return TOON with report
Every path returns a ConversionReport with decision, reason, and token estimates. Pipelines never get silent surprises.
Quick Start
JSON (stdin):
CSV (auto-detected from extension):
JSONL:
YAML (requires datoon[yaml]):
Parquet (requires datoon[columnar]):
Explicit format override:
Force conversion (bypass gating — for experiments):
Python API
JSON conversion:
Any format via read_tabular:
Structure-only analysis (no Node.js required):
MCP Server
datoon ships an MCP server with three tools:
Claude Desktop / Cursor / Windsurf config:
Run locally:
Listed on the MCP Registry, Smithery, and Glama. See MARKETPLACES.md.
Claude Code Plugin
Install directly from GitHub:
Trigger in-session:
CLI Reference
Format is auto-detected from file extension. Use --format to override or when reading from stdin.
Benchmarks
Why auto mode outperforms forced conversion
Auto mode avoids low-benefit and high-risk payloads (orders-nested, mixed-non-uniform) while matching forced TOON's average token count on suitable ones. Every decision comes with a reasoned report.
Forced conversion succeeded for 5/5 payloads.
Format conversion benchmark
Token savings when converting from common structured formats (CSV, JSONL, XML, YAML). Baseline is the JSON representation of the same data — what an LLM would receive without datoon.
Forced conversion succeeded for 4/4 payloads.
Agent skill evaluation
Artifact-based subagent comparison — identical analysis tasks, two modes:
with_skill: agent received thedatoonskill and followed the conversion workflow.without_skill: agent used JSON directly, no TOON ordatoon.
3 payload sizes × 3 iterations = 18 total agent runs. Both modes: 100% correct answers.
Full report and raw outputs: benchmarks/agent_skill_eval/. Savings are payload-token estimates, not full end-to-end model-token usage.
Development
Contributor workflow: CONTRIBUTING.md. Maintainer/agent notes: CLAUDE.md.
Setup:
Tests:
Skill sync + plugin metadata:
Links
- INSTALL.md — full install matrix, all targets, per-agent detail
- CONTRIBUTING.md — contributor workflow
- CLAUDE.md — maintainer guide for agents
- CHANGELOG.md — release history
- SECURITY.md — vulnerability reporting
- Live docs —
docs/ - Issues — bugs, features, questions
License
MIT
Source: README.md at commit 1579e24
Tools
0Version history
1- v1.9.1LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts