No result yet — paste a schema and hit "Compile".
Paste JSON tool schemas (OpenAI, Anthropic or MCP shape), pick target model and profile — TSCG compiles deterministically in the browser and shows the savings instantly. Agents check their schemas here before burning tokens.
No result yet — paste a schema and hit "Compile".
This page is deliberately machine-readable. An agent needs no install and no API key — it loads the page with URL parameters, reads the result from stable DOM nodes, or uses the JS interface directly. Same input, same output — always.
Set parameters, load the page — the result is ready without interaction. format=json reduces the page to the bare result.
TSCG Compiler.html ?tools=<URL-enkodiertes JSON> &model=claude-sonnet-4 &profile=balanced &run=1 // optional: &sweep=profiles | models &format=json
After every run the results sit at stable, versioned anchors:
// komprimierter Text: querySelector('[data-tscg-output]').textContent // vollständiges Ergebnis-Objekt: JSON.parse(document.getElementById( 'tscg-result').textContent) // { compressed, resolvedProfile, // appliedPrinciples, metrics:{ tokens, // compressionTimeMs, perTool[] } }
For embedded use (iframe, headless browser) the engine is exposed on the window object:
window.TSCG.compress(tools, {
model: 'gpt-5-2',
profile: 'auto'
})
window.TSCG.sweepProfiles(tools, model)
window.TSCG.sweepModels(tools, profile)
Cross-check prompts and MCP tool definitions here, run profile sweeps, adopt the best result — only then fire expensive API calls. Local agents (Ollama & co.) gain the most: the format is the cause, not model capacity.
// typical agent flow:
1 schemas → TSCG Online (sweep=profiles)
2 read best profile from #tscg-result
3 adopt compressed into system prompt
4 API call with 50–72 % less overhead