Skip to main content
Glama

file_grep

Search a file for a fixed string to find errors in large logs. Provide an absolute path and pattern, and limit returned matching lines.

Instructions

Search a file for a fixed string. Useful for finding an error in a large log.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostNotarget host name from the opsgate config; omit for the default host
pathYesabsolute file path to search
linesNomaximum matching lines to return (default 100, max 1000)
patternYesfixed string to search for (not a regular expression)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It mentions the fixed-string (non-regex) semantics, but that only restates the schema; it discloses nothing about case sensitivity, permissions, multi-host behavior, or what matching output looks like, which are exactly the traits an agent needs here.

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?

Two short sentences with zero filler, and the core action (search a file for a fixed string) is front-loaded before the use-case hint. Nothing could be cut without losing information.

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 simple read-only grep the essentials are present, but with no annotations and no output schema, the description should say something about the return shape (matching lines, line numbers, truncation at the lines cap). Those gaps leave an agent guessing about results.

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 four parameters (host, path, lines, pattern) are already documented in the schema, including the fixed-string caveat and the lines default/max. The description adds no parameter meaning beyond that, so the baseline 3 applies.

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+resource: search a file for a fixed string. It is distinguishable from file_read (read whole file) and journal/docker log tools by the 'search a file' framing, but it never names or contrasts any sibling, so it falls 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?

'Useful for finding an error in a large log' implies a use case, but offers no when-not guidance and never mentions alternatives such as file_read for whole-file reads or journal_errors/docker_logs for log search over other sources. Usage is implied rather than explicit.

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