tokade / by Axiom

Compact table context

Compact, lossless tables for agents.

tokade turns a table into compact, lossless context for a model. In the prompt it is the smallest lossless option: 15.56× fewer tokens than CSV on qps.csv. Behind a tool, bounded reads beat reparsing raw CSV, and exact per-column stats give counts, sums, and min/max with no scan.

tokens / formatalibaba genai traces
compact JSON41.2M
CSV30.6M
tokade6.4M
6.44× fewer tokens than compact JSON · lossless round-trip

In context: CSV vs tokade

941,884 tokens for qps.csv in a model's context as CSV.
60,535 the same trace as a tokade wire. 15.56× fewer, and it round-trips losslessly.

Encode

Encode once. Query it in place.

tokade reads each column and picks the tightest encoding for it, from more than twenty schemes. This is a 1,000-row slice of Alibaba's public qps.csv trace, the kind of GenAI request log your agent gets asked about. Every wire decodes back to the exact bytes you put in.

qps.csv · 1,000 rows19,828 tokens

timestamp_anon,request_type,value 1662859176.0,API Requests,0.09000000000000001 1662859233.0,API Requests,0.09000000000000001 1662859404.0,Generative Requests,0.09000000000000001 1662859461.0,Generative Requests,0.09000000000000001 1662859461.0,API Requests,0.09000000000000001 1662859575.0,Generative Requests,0.09000000000000001 1662859689.0,API Requests,0.09000000000000001 1662859746.0,API Requests,0.18000000000000002 1662859803.0,API Requests,0.18000000000000002 1662859860.0,API Requests,0.18000000000000002 1662859917.0,Generative Requests,0.09000000000000001 1662859974.0,API Requests,0.09000000000000001
encodeCSV()

tokade wire955 tokens

t=table
n=1000
timestamp_anon|s|d1:B:E…;L:1*3,2,1*11,2*4,1,3*3,2,1*3,2*3,1,4,6*2,13,9,5,3,…
request_type|s|B:…;M:118;API,Generative;R:2,2,4,4,2,2,4,2,3,2,3,8,10,8,5,2,2,…
value|s|S:1000;0.09000000000000001;Y:0.18000000000000002,0.63,0.36,0.27,1.69,…
20.8× fewer tokens · lossless round-trip

Querying · vs reparsing raw CSV

57× faster describe
2.6× faster column range
~2.5× faster cell · row · project

Cold CPU per call on Node v22 with tokade-mcp, versus a tool that reparses the raw CSV each call. Not a database or index. Rebuilding the full CSV from the wire is the one loser (1.48×).

Behind a tool

1 describe Names, row counts, and types come straight from the wire header. No full parse.
2 row / cell / project The server decodes the exact slice from the wire, without reparsing the whole CSV.
3 stats With stats on, the wire holds exact counts and sums, so column totals need no scan.

Tool access

One tool, in any MCP server.

The wire isn't meant to be read raw, so don't make the model read it. Bind it server-side and expose tokade_table. The model asks for the exact cell, row, or column it wants, and the server decodes just that from the wire, without reparsing the CSV. Full decode is there for when the table is small.

tokade isn't a database, a Parquet scanner, or a query engine. Filters, joins, and group-by belong there. tokade encodes what you send and gives the model bounded reads and exact stats.

mcp-server.tstokade-mcp

import { encodeCSV } from "tokade"
import { tokade_table, tokadeMcpTools } from "tokade-mcp"

// your query already filtered and limited this
const { wire } = encodeCSV(csv)

// drop wire so the model sends selectors only;
// the table never reaches the model's context
const { wire: _w, ...props } = tokadeMcpTools[0].inputSchema.properties
const selectorSchema = {
  ...tokadeMcpTools[0].inputSchema,
  properties: props,
  required: ["action"],
}

// bind the wire server-side
mcp.addTool("tokade_table", selectorSchema, (args) =>
  tokade_table({ ...args, wire }))

tokade_table → describe · preview · cell · row · column · project

Spec-first