Skip to main content
Glama

arno.grep

Read-only

Search workspace code by literal or regex patterns, returning path:line matches with optional context. Use for strings, errors, config keys, and fields, with support for multiple queries.

Instructions

Literal or regex text search across the workspace, returning path:line matches with optional trailing context — the replacement for grep -rn. Use this for anything that is not a declaration name: struct fields, string literals, error messages, config keys, or any search needing a path filter. Use find instead when you want a declaration and its body. Pass queries to search several patterns in one call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
globNoRestrict by path, e.g. *.go or internal/code/*.
limitNoMaximum matches returned (default 40). The true total is always reported. Prefer budget.
queryNoText to find.
regexNoTreat query as a regular expression. grep-style \| alternation and \( \) groups work as in grep.
budgetNoSize of the answer in tokens. Cut at whole matches; the rest is behind continue=<handle>.
contextNoTrailing lines to show per match, like grep -A (max 40).
excludeNoSkip paths containing this substring, e.g. testdata.
queriesNoSeveral patterns in one call, instead of query. Each is answered as query would be, with the same filters.
continueNoHandle from a cut answer: its next page. Other arguments except budget are ignored.
dependencyNoSearch this dependency's source instead of the workspace, read-only, at the version the project locks: a crate, Go module, npm or Python package name. Matches read as dep:<name>/<path>, which read_range accepts.
ignoreCaseNoCase-insensitive match.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.0.12

TDQS

A4.4/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true, so the safety profile is already known. The description adds meaningful behavioral context beyond that: it returns path:line matches, supports trailing context like `grep -A`, and notes that `dependency` searches are read-only. It also discloses that `continue` ignores other arguments except budget, which is a subtle behavioral trait. It doesn't mention pagination or the 'true total is always reported' behavior in the description, but the schema covers that. A 4 is appropriate because the description adds several useful behavioral details without contradicting the annotation.

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 three sentences with zero waste. The core purpose and return shape are front-loaded, the usage guidance follows immediately, and the sibling distinction is packed into the same sentence. 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 11 parameters and no output schema, the description covers the essential decision points: what it searches, what it returns, when to use it, and when to use the sibling. The schema covers parameter details. The only minor gap is that the description doesn't explicitly mention the default limit of 40 or the `continue` pagination flow, but those are in the schema and the tool is simple enough that an agent can infer the flow. A 4 is fair.

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 the schema already documents all 11 parameters. The description adds some semantic value by explaining the relationship between `query` and `queries` ('Several patterns in one call, instead of query') and by clarifying that `dependency` searches are read-only. However, most parameter meaning is already in the schema, so the description doesn't need to compensate. Baseline 3 is correct.

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 ('search'), a resource ('workspace'), and the return shape ('path:line matches with optional trailing context'). It explicitly positions itself as the replacement for `grep -rn` and distinguishes itself from `arno.find` by saying 'Use find instead when you want a declaration and its body.' This makes the tool's purpose unmistakable and differentiates it from its closest sibling.

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

Usage Guidelines5/5

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

The description gives explicit when-to-use guidance: 'Use this for anything that is not a declaration name: struct fields, string literals, error messages, config keys, or any search needing a path filter.' It also names the alternative (`arno.find`) and the condition that selects it ('when you want a declaration and its body'). This is exactly the kind of routing an agent needs.

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