MCP Server for searching text content in files
The server defines a single search tool with complete input schema and documented parameters. The naming ('search') is a standard action verb and matches the function well. The description is reasonably detailed (~265 chars) and explains the tool's purpose and context. However, the description contains a critical defect: the token 'includeContent' parameter description is repeated three times verbatim with 'When you don\'t need the detailed content, you MUST disable it to save tokens.' repeated, which appears to be a copy-paste error. Parameter descriptions are present for all inputs with type definitions (string, boolean, number), meeting schema requirements. The tool lacks output schema documentation, while the implementation returns JSON with 'results' and 'summary' fields, this is not declared in the tool definition where LLMs can see it. The server lacks error handling guidance (recovery patterns) and does not annotate the tool with destructiveHint or idempotentHint (tool is read-only, so readOnlyHint would be appropriate but is missing). Parameter defaults are appropriate (isRegex=false, caseSensitive=false, wholeWord=false, includeContent=true, maxOutputBytes=4096) and do not cause data loss. The 'directory' and 'query' parameters are well-constrained as required strings. The 'maxOutputBytes' parameter allows -1 for unlimited, which could theoretically cause memory issues but is documented and gives the agent control. Overall: solid naming, good parameter coverage, but description quality is marred by duplication, output schema is undocumented, and error guidance is absent.
Search for text content in files within a directory, provide more features than builtin `search_files` tool. CAREFULLY set the arguments to avoid introducing too much content. You should use this tool if you need to search the content of file in a repo.
Parameter description duplication: 'includeContent' parameter description contains the phrase 'When you don\'t need the detailed content, you MUST disable it to save tokens.' repeated three times verbatim. This is a copy-paste error that reduces clarity and wastes tokens.
Output schema not documented. The tool returns a JSON object with 'results' (array of search results) and 'summary' (with matchCount and totalBytes fields), but this structure is not declared in the tool definition where LLMs can see it. Agents must infer the response structure from the implementation.
Missing tool annotations. The 'search' tool is read-only and idempotent (safe to retry), but these properties are not declared via readOnlyHint or idempotentHint in the tool definition. LLMs cannot determine call safety without explicit hints.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | C | 66 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 45 | - | v1 |
Insufficient error guidance. When search fails or returns no results, error responses are generic (e.g. 'Search error: <message>'). Error responses should guide the LLM on recovery: 'Directory not found. Verify the absolute path exists.' or 'No matches found. Try a broader query or different regex pattern.'
Parameter 'maxOutputBytes' allows -1 for unlimited output. While documented, this could cause memory exhaustion if an agent requests a very broad search over a large codebase. Consider capping the absolute maximum (e.g., max 1MB) to prevent runaway resource consumption.