Skip to main content
Glama

jade.grep

Read-only

Search workspace files by literal text or regex, returning path:line matches with optional trailing context. Use for strings, fields, errors, or config keys; supports multiple patterns and path filters.

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. First observedv0.0.10

TDQS

A4.8/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true, matching the description's search-only semantics, so no contradiction. The description adds behavioral context beyond annotations: it is the replacement for `grep -rn`, supports regex and alternatives, and notes that the answer may be cut with `continue=<handle>` for pagination, which is not in annotations. It doesn't mention read-only explicitly but that's implied by the annotation; minor gap on permission details.

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 no filler. It front-loads the core purpose and return format, then adds usage guidance and a tip about `queries`. Every sentence earns its place, and it's appropriately concise for the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has 11 parameters and no output schema, but the description plus detailed schema parameter descriptions fully cover how to use it: it explains return format, pagination via `budget`/`continue`, alternatives like `queries` and `regex`, and path filtering. It also gives the sibling differentiation. For a complex search tool with multiple params, the description is complete enough for an agent to call correctly.

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

Parameters5/5

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

Schema coverage is 100% with detailed parameter descriptions (e.g., `budget` is 'Size of the answer in tokens. Cut at whole matches; the rest is behind continue=<handle>'). The description adds extra meaning by clarifying that `queries` is an alternative to `query` with same filters, and that `regex` matches grep-style syntax. It goes beyond the schema by explaining how `budget` interacts with `continue`, which is not in the schema.

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 uses a specific verb ('search') and resource ('workspace'), states the return format ('path:line matches with optional trailing context'), and explicitly distinguishes it from the sibling tool `find` ('anything that is not a declaration name' vs 'a declaration and its body'). It also names alternative uses (struct fields, string literals, error messages, config keys) making the purpose unmistakable.

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?

It provides explicit when-to-use: 'Use this for anything that is not a declaration name' and when-not: 'Use find instead when you want a declaration and its body.' It also mentions 'pass queries to search several patterns in one call' and 'grep-style alternation', giving clear guidance for multi-pattern searches. No exclusions are missing.

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