TSCG - Token-Context Semantic Grammar Compiler for LLM Tool Schemas
Description
Reference implementation of TSCG (Token-Context Semantic Grammar), a deterministic compiler for transforming JSON tool schemas into compressed, model-readable formats for use in agentic AI systems.
This bundle contains the source code of 4 npm packages:
@tscg/core (1.4.3): Core compiler with 8 operators (SDM, TAS, DRO, CFL, CFO, CAS, SAD, CCP). Sub-millisecond execution. Zero dependencies.
@tscg/mcp-proxy (1.4.3): Model Context Protocol-aware proxy with adaptive profile resolution and per-model cache reader.
@tscg/tool-optimizer (1.4.3): Framework integrations for LangChain, MCP, Vercel AI SDK.
@tscg/openclaw (1.4.3): OpenClaw plugin with adaptive sweep CLI for per-model empirical profile detection.
Validated across 20,000+ API calls on 15+ models (4B-32B parameters + frontier models GPT-4o, GPT-5.2/5.4/5.5, Claude Sonnet 4, Claude Opus 4.7).
Sub-millisecond execution. Zero dependencies. MIT licensed.
Companion findings library: github.com/SKZL-AI/tscg/tree/main/findings
Files
tscg-v1.4.3-code-bundle.zip
Files
(161.1 kB)
| Name | Size | Download all |
|---|---|---|
|
md5:90ff52a0d0d70ae56e26ed2ef482bec7
|
161.1 kB | Preview Download |
Additional details
Related works
- Is described by
- Dataset: 10.5281/zenodo.19795759 (DOI)
- Preprint: 10.5281/zenodo.19795991 (DOI)
- Is identical to
- Software: https://www.npmjs.com/package/@tscg/core (URL)
- Is supplement to
- Software: https://github.com/SKZL-AI/tscg (URL)
Software
- Repository URL
- https://github.com/SKZL-AI/tscg
- Programming language
- TypeScript
- Development Status
- Active