Skip to main content
Glama

headroom_grep

Search cached raw CCR payloads by regex or keyword to locate matches and surrounding context without loading the full text.

Instructions

Regex or keyword search inside a cached raw CCR payload without loading the full text.

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": {
      "hash": "<hash>",
      "pattern": "<pattern>"
    },
    "name": "headroom_grep"
  }
}

Input Schema

NameRequiredDescriptionDefault
hashYesCCR hash ID or ccr://<hash> URI.
patternYesRegular expression or keyword to match.
max_matchesNo
context_linesNo
case_sensitiveNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/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 load, and it does disclose one genuinely useful trait: the search runs against the cached payload without materializing the full text, which signals a bounded-cost read. It says nothing about read-only semantics, behavior on an expired or invalid hash, or how results are shaped or truncated.

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 core action and its efficiency constraint come first. The telegraphic 'CCR payload' jargon is left undefined, which costs a bit of clarity but no words are wasted.

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

Completeness2/5

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

For a five-parameter tool with no annotations and no output schema, the description is thin: it never indicates what a match looks like, whether matches are capped by max_matches, or how the hash argument is resolved. The one-line definition is not sufficient for an agent to call this confidently.

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

Parameters2/5

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

Schema coverage is only 40%, so three parameters (max_matches, context_lines, case_sensitive) have no documented meaning anywhere, and the description does not compensate. It only echoes that pattern may be a regex or keyword, which the schema already says, leaving match limits and context-line behavior unexplained.

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 (search) and a specific resource (a cached raw CCR payload), plus a distinguishing constraint: the full text is not loaded. It does not explicitly separate itself from headroom_retrieve, which is the likely sibling for reading payload content, so it stops short of a 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 implied rather than stated: 'without loading the full text' hints that this is the cheap alternative to retrieving a payload in full, but the description never names when to prefer it over headroom_retrieve or what to do when the hash is unknown. An agent must infer the routing decision.

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