Skip to main content
Glama

ParecodeSearch

Search codebase with ripgrep, returning matches with surrounding context in a single call. Supports multiple regex patterns in parallel and merges overlapping results.

Instructions

Search the codebase with ripgrep and get matches plus surrounding context in ONE call — use instead of Grep/Glob-then-Read, a raw rg/grep in the shell, or re-reading the same file at different line ranges. Pass pattern as an array to run several regexes in parallel for flow tracing; each match lists which patterns hit it. Overlapping or adjacent windows in a file are merged (gap ≤ contextLines), and the result carries one envelope-level estimatedTokens so you can budget before consuming. Read-only: widen a match with ParecodeExpand, change code with ParecodeEdit. Per-file content over ~2KB is dropped (lines listed in omittedLineRanges) — widen those via ParecodeExpand rather than re-reading. Repeated calls in a session are token-efficient: previously-returned windows come back as kind: 'reference' placeholders. Only need WHERE, not surrounding code? Add mode: 'locate' for hits-only results (file + line + matched line, no content windows), then ParecodeExpand what matters. Watch warnings — a pattern_directory_collision usually means narrow the pattern first. Needs ripgrep on PATH (run parecode doctor if missing). In CodeGraph repos (.codegraph/), prefer codegraph_explore for broad 'how does X work?' questions; best for targeted multi-pattern lookups.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patternYesRipgrep regex pattern, or an array of patterns to dispatch in parallel. Each match reports which input pattern(s) contributed via 'patterns'.
pathsNoDirectory or file paths to restrict the search. Defaults to the current working directory.
contextLinesNoNumber of context lines to include around matches. Defaults to 2. Also controls window-merge threshold within a file.
maxBytesPerFileNoSoft cap on bytes returned per file; above it, output is chunked around match centers and the trimmed lines are reported in omittedLineRanges (widen them with ParecodeExpand).
relatedSymbolsNoOpt-in: scan each match's content for likely related symbols (Handle<X>, On<X>, <X>Handler, <X>Listener, <X>Closed/Completed/Started). Returns deduped, lexically sorted, capped at 10 per match.
modeNoSet to 'locate' to return only hit locations (file + line + matched line) with no content windows — the lean option for broad fan-out searches across many files. Follow up with ParecodeExpand on the locations you care about. Omit for the default windowed result.
Behavior5/5

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

Despite no annotations, the description thoroughly discloses behaviors: read-only operation, estimatedTokens for budgeting, per-file content truncation with omittedLineRanges, deduplication via 'reference' placeholders, warning about pattern_directory_collision, and dependency on ripgrep. This fully covers what an agent needs to know.

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?

The description is well-structured and front-loaded with the primary purpose and alternatives. Every sentence provides value, but it is relatively long; slight reduction could improve conciseness without losing essential information.

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?

Given the tool's complexity (6 parameters, no output schema), the description is complete. It covers behavior, output structure (estimatedTokens, omittedLineRanges, reference placeholders), error warnings, dependencies, and alternatives. Compensates well for the lack of output schema.

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?

Although the input schema has 100% coverage, the description adds significant meaning beyond the schema: explains pattern array for parallel flow tracing, contextLines also controls window-merge threshold, mode 'locate' for lean results, and relatedSymbols scans for specific symbol patterns. This greatly aids correct invocation.

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 clearly states the tool searches the codebase with ripgrep and returns matches with context in one call. It explicitly distinguishes from alternatives like Grep/Glob-then-Read, raw rg/grep, and re-reading files, using specific verbs like 'Search' and 'use instead of'.

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?

Provides explicit guidance on when to use this tool and when to use alternatives: ParecodeExpand for widening matches, ParecodeEdit for code changes, and codegraph_explore for broad questions. Also explains the 'locate' mode for lean searches and mentions 'doctor' for troubleshooting missing ripgrep.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/BasilSkyWalk/parecode'

If you have feedback or need assistance with the MCP directory API, please join our Discord server