Connection check
local install
agentfit
Token-aware message truncation: fit a chat history into your model's context budget.
Tools
4
GitHub stars
1
Installs / wk
—
Licence
MIT
Transport
stdio
Last checked
never
Tools & capabilities
4 toolsRead from the published package source — this server runs locally, so there is no endpoint to query. Names are taken from the code, not observed at runtime, and descriptions are often absent.
agentfit
from source
count_tokens
from source
Estimate tokens in a string or chat-message array. Fast, dependency-free, within ~10-20% of true tokenizer counts on English prose. Pass a model name to pick the right per-family e… Estimate tokens in a string or chat-message array. Fast, dependency-free, within ~10-20% of true tokenizer counts on English prose. Pass a model name to pick the right per-family estimator (openai, anthropic, google, llama, default).
fit_messages
from source
Drop messages from the input array until the total is under maxTokens. Three strategies: drop-oldest (default), drop-middle, priority (uses each message\ Drop messages from the input array until the total is under maxTokens. Three strategies: drop-oldest (default), drop-middle, priority (uses each message\
list_estimators
from source