Skip to main content
Glama
Smart Quota Orchestrator

Smart Quota Orchestrator

by ElNeMeR70

sqo_budgeted_diff

Compress working-tree git diffs into a strict token budget by stripping lockfiles, sourcemaps, and generated bundles before sending to AI agents.

Instructions

Compress working-tree git diff into a strict token ceiling, automatically stripping lockfiles, sourcemaps, and generated bundles.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "workspace": "<workspace>"
    },
    "name": "sqo_budgeted_diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
stagedNoInspect staged changes only.
workspaceYesGit repository path.
max_tokensNoMaximum token budget (default: 2000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv13.0.0

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the whole burden. It does disclose one valuable behavior — automatic stripping of lockfiles, sourcemaps, and generated bundles — but leaves the important traits unstated: whether the operation is read-only/non-mutating, what happens when the diff still exceeds max_tokens (truncation vs. summarization vs. error), and what the returned payload looks like. For an unannotated tool those omissions are material.

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

Conciseness5/5

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

A single sentence with no filler, front-loading the core action and following with the differentiator (what gets stripped). Every clause earns its place.

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

Completeness3/5

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

With no annotations and no output schema, the description must cover safety and return behavior, and it only partially does. Purpose and filtering are covered, but overflow behavior and response shape are absent, leaving an agent unable to predict what it receives when the budget is tight.

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 all three parameters (workspace, staged, max_tokens) are already documented in the schema, establishing a baseline of 3. The description reinforces the token-ceiling concept behind max_tokens but adds no per-parameter detail such as token-counting method or how staged interacts with the working-tree scope.

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?

States a specific verb and resource: 'Compress working-tree git diff into a strict token ceiling', plus the filtering behavior. An agent immediately knows this is a diff-to-budget tool, distinct in kind from sqo_git_forensics or sqo_compress_prompt. It stops short of explicitly naming a sibling or contrast case, so it lands at 4 rather than 5.

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 only implied: an agent must infer that this is the tool to reach for when a raw diff would blow a context budget. There is no explicit when-to-use statement, no when-not-to-use, and no pointer to an alternative (e.g. a full-diff or forensics tool) for callers who need unfiltered output.

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