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

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

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

TDQS

A4/5.0

Scored across 8 tools

Disambiguation3/5

Several tools overlap in purpose: optimize_messages, prune_context, and minify_tool_result all reduce token counts, while list_model_presets and high_context_presets both list presets. However, descriptions clarify distinct use cases (full prompt vs. memory store vs. tool result; standard vs. high-context configs), so most boundaries are navigable.

Naming Consistency4/5

Most tools follow a clear verb_noun pattern (optimize_messages, estimate_tokens, prune_context, minify_tool_result, inspect_budget, get_config, list_model_presets), but high_context_presets breaks the pattern as an adjective_noun phrase, causing a minor inconsistency.

Tool Count5/5

With 8 tools, the set is well-scoped for a specialized token optimization server. Each tool addresses a distinct aspect (estimation, minification, pruning, budget inspection, config, presets) without unnecessary bloat or redundancy.

Completeness4/5

The tool surface covers the core lifecycle of token optimization: estimating, minifying, pruning, inspecting budgets, and retrieving config/presets. Minor gaps exist (e.g., no explicit tool to reverse or restore compressed content), but these are not essential given the lossy and config-driven design.

Maintenance

ActivityMaintained
ResponsivenessUnresponsive