Skip to main content
Glama

Find lines in the project's files

grep
Read-only

Finds every line that holds an exact string or matches a pattern, across the project's documents, text files and code: exact text by default, or an extended regular expression with regex. Each line comes with its § address, ending #L and the line number. At most 200 lines; folder keeps it to one folder. For finding where something is named or used.

Input Schema

NameRequiredDescriptionDefault
regexNoRead the pattern as an extended regular expression.
folderNoA folder of the project, like src or research.
patternYesThe text to find, on one line, at most 200 characters.
projectNoThe project's slug, from open_project, like acme. Not needed when a § address names the project, or when the person is on one project.
ignore_caseNoMatch letters in either case.

Output Schema

NameRequiredDescriptionDefault
hitsYes
filesYes
cappedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, destructiveHint=false, and openWorldHint=false, so the safety profile is covered. The description adds useful behavioral detail beyond that: each result line includes a § address ending in #L plus line number, results are capped at 200 lines, and folder scoping limits the search.

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?

Three tightly packed sentences with no wasted words, front-loading the core action and following with defaults, result format, cap, and usage context. Every clause earns its place.

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?

For a read-only search tool with full schema descriptions and an output schema, the description supplies purpose, matching modes, output address format, result cap, and folder scoping. It could more explicitly route the agent versus the sibling 'search' tool, but otherwise an agent has enough to call it correctly.

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

Parameters4/5

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

Schema coverage is 100%, setting the baseline at 3, but the description adds useful semantic clarifications: pattern is exact text by default, regex switches to extended regular expressions, and folder confines results to one folder. It does not explain project or ignore_case, but those are already covered by the schema.

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 ('Finds') and resource ('lines') across documents, text files and code, and distinguishes exact-string mode from regex mode. It is clear, but it does not explicitly contrast itself with the sibling 'search' tool, so it is not fully sibling-differentiated.

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?

Gives a clear use case: 'For finding where something is named or used,' and explains exact matching by default versus regex. It does not state when not to use it or name alternatives such as 'search', so it falls short of a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources