Skip to main content
Glama

grep

Read-only

Search paragraphs with regular expressions in DOCX, ODT, and Google Docs files. Supports case sensitivity, whole word matching, and raw XML 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. ODT supported via file_path (single-file) only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathNoPath to the DOCX or ODT 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.
Behavior4/5

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

Annotations declare readOnlyHint and destructiveHint, confirming safety. The description adds behavioral context: it searches paragraphs with regex, specifies input modes, and notes ODT-only support via file_path. No contradictions. Additional details about regex flags or output format would improve transparency.

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 concise: two sentences that front-load the core action ('Search paragraphs with regex') and efficiently convey key usage distinctions. No redundant or unnecessary text.

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's complexity (12 parameters, no output schema, low schema coverage), the description is insufficient. It does not explain return values (e.g., matching paragraphs), result limits, or behavior of regex flags, leaving significant gaps for an agent to use the tool correctly.

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 description coverage is low (42%), and the description adds meaning to only the file/file-path parameters (file_path, file_paths, google_doc_id) and ODT support. The remaining 7 parameters (e.g., pattern, case_sensitive, max_results) lack description in both schema and tool description, leaving their semantics unclear.

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's purpose: 'Search paragraphs with regex.' It specifies different input modes (file_path, file_paths, google_doc_id) and highlights the ODT limitation, effectively distinguishing it from sibling tools 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 provides clear guidance on when to use different input parameters (session-based vs stateless multi-file vs Google Docs) and notes ODT support limitations. However, it lacks explicit guidance on when not to use this tool or alternatives among siblings.

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