TAN TokenDiet

v1.4.0
io.github.20171806011/tan-tokendiet Checked 4 days ago Published 13 days ago

Audit and compact MCP tool schemas & AGENTS.md to cut LLM token burn and fix prompt-cache misses.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

audit_agent_context

Audit AGENTS.md, CLAUDE.md, GEMINI.md, SKILL.md, or system prompt text for token bloat, prompt-cache busters, and monthly LLM cost.

ParameterTypeDescription
text *stringRaw markdown or prompt text to audit.
cache_hit_ratenumber
cache_write_ttlstring
model_idstring
sourcestring
team_sizeinteger
turns_per_dayinteger

audit_mcp_schema

Audit an MCP tools JSON array or mcp.json payload across 12 diagnostic rules for token burn and 5m/1h prompt-cache safety.

ParameterTypeDescription
payload *MCP tools array, {tools:[...]} object, or JSON string.
cache_hit_ratenumber
cache_write_ttlstring
model_idstring
sourcestring
team_sizeinteger
turns_per_dayinteger

estimate_context_cost

Compare monthly USD and GBP input token burn across frontier LLM models with prompt-cache hit and TTL write multipliers.

ParameterTypeDescription
tokens_per_turn *integer
cache_hit_ratenumber
cache_write_ttlstring
team_sizeinteger
turns_per_dayinteger

minify_mcp_schema

Compact MCP tool schemas deterministically with 100% JSON Schema structural invariant verification and sorted keys.

ParameterTypeDescription
payload *MCP tools array, {tools:[...]} object, or JSON string.
aggressiveboolean
sort_toolsboolean