Skip to main content
Glama
OpenCode Context Optimizer (OCCE)

OpenCode Context Optimizer (OCCE)

by SammySN-car

diff_compact

Generate a zero-context git diff of uncommitted or specific files, removing unchanged lines and index boilerplate to reduce token usage.

Instructions

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

Input Schema

NameRequiredDescriptionDefault
stagedNoWhether to inspect staged changes only.
filepathNoOptional specific file path to diff.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are supplied, so the description carries the full disclosure burden. It does explain the key behavioral trait that output is deliberately context-free (no unchanged surrounding lines) and stripped of git index boilerplate, which is valuable for an agent that may otherwise expect surrounding code. It omits permissions/read-only confirmation, truncation or size limits on large diffs, and behavior for untracked or binary files.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence that leads with the verb and format and then explains the two compression effects. Dense and largely waste-free, though the parenthetical flag plus its prose restatement is slightly redundant for git-literate agents.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter, all-optional read tool with no output schema, the description covers the essential thing an agent needs: what the returned diff looks like (zero context, no boilerplate). Minor gaps around size limits and untracked files keep it from being exhaustive.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters, establishing a baseline of 3. The description's phrases 'uncommitted changes' and 'specific files' loosely map to the staged and filepath parameters but add no syntax, format, or default-override detail beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource ('Generate a zero-context (-U0) git diff') and states its scope ('uncommitted changes or specific files') plus its distinguishing trait, the removal of context lines and index boilerplate. No sibling among code_skeleton, symbol_slice, smart_exec, test_compress or token_ledger offers a diff, so no explicit differentiation is needed, but the description also does not say how it relates to those token-saving tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied rather than stated: it is for uncommitted changes, optionally narrowed to a single file. There is no indication of when to prefer it over other inspection tools, no note about untracked files, and no exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.