Skip to main content
Glama

find_docx_term

Search a DOCX file's accepted text using a regular expression to locate matches, returning context and tracked-change status for each hit.

Instructions

Search the accepted text of a DOCX for a regular expression.

pattern is a Python regex. flags is a comma-separated list of re flag names, such as "IGNORECASE,DOTALL". Returns a list of {para_index, match, context, has_tracked_change}.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>",
      "pattern": "<pattern>"
    },
    "name": "find_docx_term"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
flagsNoIGNORECASE
limitNo
patternYes
context_charsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose meaningful behavior: only accepted text is searched and each hit reports has_tracked_change. But it omits whether the operation is read-only, how the default limit of 100 truncates results, and what happens on an invalid regex.

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 core action is front-loaded in one sentence, followed by compact notes on regex dialect, flag syntax, and return shape. The return-shape sentence is somewhat redundant given an output schema exists, but it is short and not wasteful.

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

Completeness3/5

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

An output schema exists, so return values need not be spelled out, and the description covers the regex dialect and flag format well. However, for a five-parameter tool with zero schema descriptions, the silence on limit, context_chars, path, and result-truncation behavior leaves real gaps.

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 0%, so the description must carry parameter meaning, yet it only explains pattern (Python regex) and flags (comma-separated re flag names). path, limit, and context_chars — three of five parameters — are left unexplained, including how context_chars relates to the returned 'context' field.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: search the accepted text of a DOCX for a regular expression. That distinguishes it from siblings like read_docx_accepted_text (which returns text rather than matches), though the description never names a sibling explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied by the phrase 'search the accepted text' — an agent can infer this is the regex-search tool. There is no statement of when to prefer it over check_docx_term_variants or read_docx_accepted_text, and no exclusions or prerequisites.

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