Skip to main content
Glama

grep

Read-only

Search paragraphs in DOCX files or Google Docs using regular expressions. Supports session-based single file, stateless multi-file, or direct Google Doc search.

Instructions

Search paragraphs with regex. Use file_path for session-based search, file_paths for stateless multi-file search, or google_doc_id for Google Docs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathNoPath to the DOCX file.
google_doc_idNoGoogle Doc ID or URL (alternative to file_path). Extract from URL: docs.google.com/document/d/{ID}/edit
file_pathsNoMultiple file paths for stateless multi-file search. No session created.
patternsNo
patternNo
case_sensitiveNo
whole_wordNo
max_resultsNo
context_charsNo
dedupe_by_paragraphNo
search_xmlNoWhen true, search raw XML (word/document.xml) instead of paragraph text.
include_contextNoWhen false, skip document view context (list labels, headers) for faster results. Default: true.
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is clear. The description adds that it searches paragraphs with regex, but does not elaborate on other behaviors like case sensitivity, whole word, or the effect of search_xml. This is adequate but not rich beyond what annotations provide.

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 extremely concise—a single sentence that efficiently conveys the core purpose and primary usage alternatives. There is no redundant or unnecessary text, and the key information is front-loaded.

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

Completeness2/5

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

Given the tool has 12 parameters, no output schema, and low schema description coverage, the description is too brief. It fails to explain the meaning of most parameters, return format, or what constitutes a 'paragraph.' The description provides minimal context beyond the entry modes, leaving significant gaps for correct invocation.

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

Parameters2/5

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

Schema coverage is only 42%, meaning most parameters lack descriptions in the schema. The description only adds value for three parameters (file_path, file_paths, google_doc_id) by explaining their usage contexts. Other key parameters like patterns, case_sensitive, whole_word, etc., are left unexplained, forcing the agent to infer meaning from names alone.

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 the verb 'search' and resource 'paragraphs with regex', clearly indicating the tool's function. It also distinguishes between three search modes (file_path, file_paths, google_doc_id), making it easy to understand what the tool does relative to siblings like read_file or replace_text.

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?

The description explicitly explains when to use each mode: file_path for session-based, file_paths for stateless multi-file, google_doc_id for Google Docs. This provides clear context for selecting the appropriate parameter. However, it does not mention when not to use the tool or contrast with sibling tools, which would make it even stronger.

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/UseJunior/safe-docx'

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