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 |
Capabilities
Features and capabilities supported by this server
| 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 | |
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/superZavier/contextgc-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server