Skip to main content
Glama

grep

Read-only

Find lines matching a text pattern in workspace files. Use options like path, glob, case-insensitivity, and context to pinpoint relevant content.

Instructions

Search file content using Pi and return matching lines.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
globNo
pathNoAbsolute path or path relative to the workspace. Home is a starting directory, not a sandbox.
limitNo
contextNo
literalNo
patternYes
ignoreCaseNo
workspace_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

C2.4/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds little beyond that: it repeats the basic return behavior and introduces the unexplained 'Pi' engine. It does not disclose regex semantics, glob behavior, context/limit effects, or hidden-file handling, which would be useful for a grep-like tool.

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

Conciseness2/5

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

The description is short but incomplete in a way that undermines usability. The phrase 'using Pi' is vague and unexplained, so not every sentence earns its place. It is more underspecified than appropriately concise.

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 tool with 8 parameters)Skip the XML structure. The output should be wrapped in a single code block with language JSON. The description doesn't explain the return format beyond 'matching lines,' nor does it clarify pattern syntax or when to prefer this over find/read. The read-only annotation helps, but the overall package is too sparse for confident correct invocation.

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

Parameters1/5

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

Schema description coverage is only 13%, so the description must compensate for explaining the parameters, but it does not. The names pattern, glob, limit, context, literal, ignoreCase, and workspace_id are left to inference. The description is entirely about the operation, not the parameter meanings.

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?

The description clearly identifies the operation as a file-content search that returns matching lines, distinguishing it conceptually from siblings like ls or find. The phrase 'search file content' communicates the resource and action. However, 'using Pi' is unexplained jargon that weakens an otherwise clear purpose.

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

Usage Guidelines2/5

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

There is no guidance on when to use grep versus find, read, or bash. The description does not mention alternatives, exclusions, or context such as 'use this to search file contents, not filenames.' Usage must be inferred entirely from the command-style name and sibling names.

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