Skip to main content
Glama

search_document

Search .docx files for specific text and retrieve matching lines with line numbers and context. Case-insensitive.

Instructions

Searches for text within a .docx file and returns matching lines with line numbers and context. Case-insensitive. Use for finding specific content within a document.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute or relative path to a .docx file
queryYesText to search for (case-insensitive)
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It reveals key behaviors: the search is case-insensitive, and it returns matching lines with line numbers and context, which is more informative than a generic search description. It does not discuss error handling or edge cases, but for a read-only search tool, the essential behaviors are covered.

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 consists of three concise sentences, each serving a clear purpose: statement of function, behavioral detail (case-insensitivity), and usage context. There is no redundancy or extraneous information, making it highly efficient.

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?

For a simple two-parameter tool without an output schema, the description is complete. It covers the tool's purpose, return format ('matching lines with line numbers and context'), the case-insensitive behavior, and when to use it. The absence of error details is acceptable for a tool of this simplicity.

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?

The input schema already provides complete descriptions for both 'path' and 'query', with 100% coverage. The description adds 'case-insensitive' but this is also noted in the schema's query property. Therefore, the description does not add significant meaning beyond what the schema already provides, warranting the baseline score of 3.

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 function: 'Searches for text within a .docx file and returns matching lines with line numbers and context.' This specifies the operation, resource, and output format, and it distinguishes the tool from siblings like read_document (which likely returns the full document) and get_document_metadata (which provides metadata).

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 explicit usage guidance: 'Use for finding specific content within a document.' This clearly indicates when the tool is appropriate. However, it does not explicitly mention alternatives or contrast with sibling tools, so it falls short of the highest tier of guidance.

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/bradygaster/docx-mcp-server'

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