Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
SLIMTOKEN_MINIFYNoMaster switch; 0 = passthrough.1
SLIMTOKEN_KEEP_LASTNoRecent turns kept verbatim by distill/budget.4
SLIMTOKEN_MINIFY_DEDUPNoEnable collapsing repeated tool results.1
SLIMTOKEN_MINIFY_TOOLSNoEnable tool schema minification.1
SLIMTOKEN_MINIFY_BUDGETNoHard token cap; 0 disables hard prune.131072
SLIMTOKEN_MINIFY_SYSTEMNoEnable system prompt compression.1
SLIMTOKEN_TOOL_COMPRESSNoLossy type-specific tool-result compression.1
SLIMTOKEN_MINIFY_DISTILLNoEnable distilling old turns to summaries.1
SLIMTOKEN_DEDUP_MIN_CHARSNoOnly dedup tool results at least this long.200
SLIMTOKEN_MINIFY_MESSAGESNoEnable message text compression.1
SLIMTOKEN_MINIFY_TOOL_SKIPNoComma-list of tool names to never minify.
SLIMTOKEN_DISTILL_MAX_CHARSNoMax chars per distilled old turn.160

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
slimtoken.optimize_messagesA

Reduce prompt size while preserving message structure and tool-call validity (pair-safe, fence-aware). Returns the minified messages plus token counts. Lossy by default (distill + tool-result compression); disable stages via the SLIMTOKEN_MINIFY_* env knobs.

slimtoken.estimate_tokensA

Count tokens in a request body using the real cl100k_base tokenizer (bundled, offline). Returns total + per-message breakdown. The model arg is accepted for forward-compat but the count is cl100k-approximate for non-cl100k models.

slimtoken.prune_contextA

RAG-style context pruning for a memory/conversation store: strip low-value text, retrieve warm entries relevant to a query, sliding-window summarize old turns, and enforce a token budget. Returns a ready-to-inject / prompt block.

slimtoken.minify_tool_resultA

Compress a large tool_result content block using type detection (directory listing, git output, logs, JSON, source). LOSSY — emits a compact representation plus a [slimtoken-compressed] metadata header. Pair-safe by construction (only the content field changes).

slimtoken.inspect_budgetA

Read-only token-budget inspection: counts system/tools/messages, reports headroom against a token_budget, and whether the pair-safe pruner would drop any leading messages. Does not modify the body.

slimtoken.get_configA

Return the slimtoken config in use: the always-on MinifyConfig built from SLIMTOKEN_* env knobs (the single config surface shared by the proxy, CLI, and MCP server). Useful to see what slimtoken will do.

slimtoken.list_model_presetsA

List recommended local-model presets by GPU VRAM tier (4/8/16GB), each with a usable context. With measure=true, enriches each row with the live measured token reduction on a bloated payload (run by the pipeline itself).

slimtoken.high_context_presetsA

High-context VRAM-tier configs (dense AND MoE) showing how slimtoken compression expands the effective context window. Each row gives the largest nominal context that fits fully in VRAM (computed by config_optimizer, q4_0 KV, flash attn, full offload) and the effective raw-token capacity = nominal_ctx / (1 - reduction). Use best=true for just the largest-effective-context preset of a tier.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/greyok00/slimtoken'

If you have feedback or need assistance with the MCP directory API, please join our Discord server