Skip to main content
Glama
AtefAndrus

@atef_andrus/mcp-ripgrep

by AtefAndrus

Ripgrep Search

search

Find file contents matching regex or literal patterns across codebases, with filters for file type, glob, depth, context, and multiline matches.

Instructions

Search file contents for a pattern using ripgrep. Supports regex, literal strings, multiline matching, OR matching via additionalPatterns, and various filtering options. For large or unfamiliar codebases, consider using search-count or search-files first to assess the scope of matches.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
globNoGlob pattern to filter files (e.g. '*.test.ts')
pathYesDirectory or file to search
sortByNoSort results by field
patternYesSearch pattern (regex by default)
fileTypeNoFilter by file type (e.g. 'ts', 'py')
maxDepthNoMaximum directory traversal depth
noIgnoreNoDo NOT respect .gitignore rules (search files that are normally ignored)
multilineNoEnable multiline matching (for function signatures, import blocks, etc.)
wordMatchNoOnly match whole words
jsonOutputNoOutput in JSON Lines format
maxColumnsNoMaximum display width per line (useful for minified files)
maxResultsNoMaximum matches per file
fileTypeNotNoExclude file type (e.g. 'json')
invertMatchNoShow lines that do NOT match the pattern
afterContextNoLines of context after each match
contextLinesNoLines of context before and after each match. When beforeContext or afterContext are also specified, they override the respective side.
fixedStringsNoTreat pattern as a literal string instead of regex
beforeContextNoLines of context before each match
caseSensitiveNotrue = case-sensitive, false = case-insensitive, omit = smart-case
includeHiddenNoInclude hidden files and directories
maxCharactersNoMaximum characters in the result. Truncated with summary if exceeded.
followSymlinksNoFollow symbolic links
additionalPatternsNoAdditional patterns for OR matching. When fixedStrings is true, all patterns (including these) are treated as literal strings.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A3.6/5.0
Behavior3/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 discloses matching modes (regex default, literal, multiline, OR), which is useful, but says nothing about output format, truncation behavior, whether results are paged, or performance characteristics on large trees. For a 23-parameter tool with zero annotation coverage this leaves meaningful gaps.

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

Conciseness4/5

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

Two sentences, front-loaded with the core action before the alternative-tool guidance. The middle clause ("and various filtering options") is vague filler, but overall the description is efficiently sized for a tool with 23 parameters.

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?

With no output schema, the description should ideally hint at the return shape, but it only notes that jsonOutput exists via the schema, not what default output looks like. The 100% schema coverage compensates for parameter documentation, but an agent still lacks return-value and truncation context for a high-complexity tool.

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 every parameter in detail. The description restates a few capabilities (regex, fixed strings, multiline, additionalPatterns) but adds no syntax, defaults, or interaction rules beyond what the schema provides, so 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 and resource ("Search file contents for a pattern using ripgrep") and names the capabilities that differentiate it (regex, multiline, OR matching). It stops short of directly contrasting itself with search-files or search-and-replace, so the differentiation is partial.

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?

Explicitly routes the agent to alternatives with a condition: "For large or unfamiliar codebases, consider using search-count or search-files first to assess the scope of matches." That names the alternative tools and when to prefer them, though it gives no when-not-to-use guidance for this tool itself.

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