Skip to main content
Glama

guard_context

Reads files and directories, drops noise, and packs relevant context under a strict token budget to keep coding agents within limits.

Instructions

Read files/dirs, drop noise (lockfiles, build output, logs, minified/binary), and pack them under a strict token budget.

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": {
      "paths": "<paths>"
    },
    "name": "guard_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathsYes
budgetNosmall (4k) | medium (8k) | large (16k) | integer
ignoreNoextra filename globs to drop

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose meaningful behavior: which file classes are silently dropped (lockfiles, build output, logs, minified/binary) and that a budget is enforced strictly, which implies truncation. It does not say what happens when the budget is exceeded (truncate, skip, summarize), in what order content is prioritized, or what the result shape is.

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 with no filler; the parenthetical noise list is dense but each item earns its place by telling the agent what will vanish. Slightly compressed to the point that priority/truncation logic has no room, but nothing is wasted or buried.

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?

For a 3-parameter tool with no output schema and no annotations, the description covers what goes in and what gets filtered but not what comes out or how the budget is applied when content overflows. The return-format gap is the significant one since nothing else in the definition supplies it.

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 coverage is 67%, so the schema documents budget's presets and ignore's purpose. The description reinforces the budget concept ('strict token budget') and clarifies that paths accepts both files and directories. It adds nothing about ordering or precedence among paths, and the ignore parameter is not mentioned at all.

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 concrete verb chain (read, drop noise, pack) on a specific resource (files/dirs) under a stated constraint (token budget). The noise categories in parentheses make the operation unambiguous. It does not, however, contrast itself with inspect_file, so an agent must infer the difference between single-file inspection and budgeted bulk packing.

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: the tool is for pulling in many files when context size matters. There is no explicit when-to-use, when-not-to-use, or pointer to inspect_file for single-file reads. An agent can reasonably guess the intended situation, but must do the guessing itself.

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

Deploy Server

Other Tools