Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
OMLX_SHRINK_MODELNoModel name to summarise with; empty disables the model mode.
OMLX_SHRINK_API_KEYNoBearer token, if the server needs one.
OMLX_SHRINK_TIMEOUTNoSummariser request timeout, in seconds.180
OMLX_SHRINK_BASE_URLNoOpenAI-compatible base URL used by compact_context when base_url is not given.http://127.0.0.1:8000/v1

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
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
estimate_contextB

Estimate the current context size in tokens before sending it to the model.

Example call::

estimate_context({
    "messages": [{"role": "user", "content": "hello"}],
    "max_context_tokens": 32768,
})
trim_contextA

Trim the oldest messages when the estimated context exceeds the model limit.

Example call::

trim_context({
    "messages": [...],
    "keep_last": 8,
    "max_context_tokens": 32768,
})
compact_contextA

Replace the oldest messages with a summary instead of dropping them.

The summary comes from summary when given, otherwise from the local model via model/base_url (or the CONTEXT_SHRINK_MODEL / CONTEXT_SHRINK_BASE_URL environment variables). With neither, the tool returns a needs_summary plan plus the exact prompt, and no message content is echoed back.

Example call::

compact_context({
    "messages": [...],
    "keep_last": 8,
    "threshold": 0.8,
    "summary": "…",  # omit to summarise with the model
})

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.8/5.0

Scored across 3 tools

Disambiguation4/5

Each tool maps to a distinct stage of context management: estimate (measure), trim (drop oldest), compact (summarize oldest). Boundaries are mostly clear, though trim_context and compact_context both trigger when context exceeds a limit and differ only in how old messages are handled, which could cause slight hesitation in selection.

Naming Consistency5/5

All three tools follow a consistent verb_noun convention (estimate_context, trim_context, compact_context) with parallel suffixes. Predictable and easy to scan.

Tool Count5/5

Three tools is a tight, well-scoped set for a focused context-shrinking utility. Each tool corresponds to a necessary step in the workflow (measure, reduce, summarize), with no redundant tools.

Completeness4/5

The estimate-trim-compact lifecycle covers the core domain well. A minor gap exists: there is no way to inspect or report the resulting message list after trimming/compacting beyond the returned plan, but the surface is largely complete for the stated purpose.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues