ContextGC
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CONTEXTGC_CONFIG | No | Custom configuration file path | |
| CONTEXTGC_ENABLED | No | Global switch to enable or disable ContextGC | true |
| CONTEXTGC_LOG_LEVEL | No | Log level (debug/info/warn/error) | warn |
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
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| read_code_skeletonA | Reads a source code file and returns ONLY its structural skeleton (imports, type definitions, class declarations, function signatures with parameter types and return types). Internal logic is replaced with '/* ... [omitted by ContextGC] ... */'. Use this tool FIRST when exploring files larger than 100 lines to save 70-90% context tokens. After reviewing the skeleton, use read_function_body to expand specific functions. |
| read_function_bodyA | Expands the full implementation of a specific function/method from a file. Use AFTER read_code_skeleton when you need to see a particular function's logic. This returns ONLY the requested function's complete body, not the entire file. |
| parse_error_logA | Parses and compresses error logs / stack traces to extract only the essential error information. Filters out node_modules frames, keeps only your source code references. Use this instead of reading raw stderr output to save 90%+ tokens. |
| context_gcA | Trigger context garbage collection. This clears cached file skeletons that are no longer needed, freeing context window space. Use this when you notice context is getting full or after completing a task branch. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| context_gc_rules | Token optimization rules for ContextGC. Apply these rules to minimize context usage. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 4 tools
Each tool has a clear, distinct purpose: freeing cache, compressing error logs, reading structural skeletons, and expanding function bodies. No overlap in functionality.
All tools follow a consistent verb_noun snake_case pattern, e.g., context_gc, parse_error_log, read_code_skeleton, read_function_body. Predictable and clear.
Four tools is well-scoped for a server focused on context optimization. Each tool earns its place with a specific function, not too few or too many.
The tool set covers the key strategies: triggering GC, compressing errors, reading skeletons, and expanding functions. Minor gaps like clearing specific caches exist but do not hinder typical workflows.