Skip to main content
Glama
OpenCode Context Optimizer (OCCE)

OpenCode Context Optimizer (OCCE)

by SammySN-car

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

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
}

Tools

Functions exposed to the LLM to take actions

NameDescription
code_skeletonA

Extract an AST outline of classes, functions, signatures, argument type hints, and docstrings from a source file, replacing bodies with '...'. Consumes 80-94% fewer tokens than raw file reading.

symbol_sliceB

Extract the exact implementation of a single class or function by symbol name (e.g., 'PaymentGateway' or 'PaymentGateway.charge' or 'charge'), avoiding the need to read the entire file.

smart_execB

Execute a shell command with real-time ANSI escape stripping, carriage-return collapse, package manager progress bar & spinner suppression, and intelligent head/tail truncation.

test_compressA

Run test suites (pytest, cargo test, go test, jest/vitest) and output only failing tests, assertion errors, and clean stack frames, collapsing passed tests into a 1-line summary.

diff_compactA

Generate a zero-context (-U0) git diff of uncommitted changes or specific files, eliminating unchanged surrounding context lines and git index boilerplate.

token_ledgerB

Check current session token usage, cumulative savings achieved by OCCE, and free-model attention health zone (GREEN / YELLOW / RED alert).

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.7/5.0

Scored across 6 tools

Disambiguation4/5

Each tool has a distinct role: AST outline vs. single-symbol extraction vs. command execution vs. test output vs. diff vs. token accounting. The only mild overlap is code_skeleton vs. symbol_slice, where both read source code, but the outline-vs-implementation distinction in the descriptions resolves it.

Naming Consistency4/5

All names are snake_case two-word compounds in a modifier+noun style (code_skeleton, symbol_slice, test_compress, diff_compact, token_ledger), with smart_exec being the only slight deviation in verb-vs-noun form. Readable and predictable overall.

Tool Count5/5

Six tools for a context-optimization server is well-scoped: two for reading code, three for compressing execution/test/diff output, one for telemetry. No filler tools.

Completeness4/5

The surface covers code reading, command execution, test output, diffs, and token accounting, which are the core levers of context reduction. A small gap is the absence of a symbol/search tool to locate symbols across files before calling symbol_slice.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues