Skip to main content
Glama

deck_grep

Search a reservoir deck and its include files for regex patterns, returning file, line, and context for each match.

Instructions

Regex search across a deck AND its resolved INCLUDE tree (PATHS-aware).

The deck-QC workhorse: deck_grep(deck, "^WCONPROD|^LIFTOPT", context=8) returns file, line number, and context for every keyword hit — including keywords that live in include files referenced via $ALIAS paths. Files larger than ~8 MB (bulk GRDECL arrays) are skipped and reported.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contextNo
patternYes
deck_pathYes
ignore_caseNo
max_matchesNo
search_includesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the burden of behavioral disclosure. It does well by explaining that the search resolves the INCLUDE tree, respects $ALIAS paths, returns file/line/context, and skips files larger than ~8 MB while reporting them. It does not mention the max_matches cap or default case-insensitivity, but the core behavioral traits are clearly disclosed.

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?

The description is compact, front-loaded with the essential behavior, and every sentence adds value: the search scope, the worked example, the return contents, include-file handling, and the large-file skip behavior. No filler or redundant restating of the tool name or schema.

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?

Given that an output schema exists and the schema defines parameters with defaults, the description is largely complete for an agent to invoke the tool. It covers what the tool returns, how includes are resolved, and an important edge case (large files skipped). The only notable gap is that it does not clarify the interaction between the default max_matches=40 and the claim of returning 'every keyword hit.'

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 0%, so the description must compensate. It adds meaning for pattern (via regex example), context (via context=8 example), deck_path (as the deck), and search_includes (via include-tree traversal). However, it does not explain ignore_case or max_matches beyond what the schema property names already imply, and the phrase 'every keyword hit' is not qualified by max_matches.

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

Purpose5/5

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

The description states a specific verb and resource: 'Regex search across a deck AND its resolved INCLUDE tree'. It clearly differentiates this tool from siblings like deck_text, summarize_deck, or pack_deck by emphasizing grep-like search behavior, include-tree traversal, and PATHS-awareness. The example makes the purpose concrete.

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

Usage Guidelines4/5

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

The description gives clear context by calling this 'the deck-QC workhorse' and showing a realistic regex query, which implies the tool is for inspecting keyword occurrences during deck validation. It does not explicitly list alternatives or when-not-to-use cases, so it falls short of a 5, but enough context is present for an agent to select it appropriately.

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