Skip to main content
Glama

Find Text

find_text
Read-only

Find text anywhere in Word documents—paragraphs, tables, text boxes—and get locations plus context. Filter by effective formatting to locate styled content.

Instructions

Find text in paragraphs and table cells; returns locations plus context. include_textboxes=True also searches text-box content as labeled matches; file-mode only. Pass formatting={...} (bold, font, size_pt, color, ...) to search by EFFECTIVE formatting: resolved through run, style chain, and defaults; query=None returns every formatted stretch; scope 'body' or 'all'; file-mode, no regex. Plain queries search open documents live (same shape, 500-match cap). Read-only. To read a known range, use get_text.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
liveNoauto: file or live; force: live; off: refuseauto
queryNo
regexNo
scopeNobody
file_pathYes
formattingNo
context_charsNo
include_textboxesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.2.1
    • addedInput schema / properties / live / description
      Added value: +"auto: file or live; force: live; off: refuse"
    • addedInput schema / properties / live / enum
      Added value: +[
      +  "auto",
      +  "force",
      +  "off"
      +]
  2. Changed6 schema fields changedv2.0.0
    • addedInput schema / properties / formatting
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedInput schema / properties / query / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / query / default
      Added value: +null
    • removedInput schema / properties / query / type
      Removed value: -"string"
    • addedInput schema / properties / scope
      Added value: +{
      +  "default": "body",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "file_path",
      -  "query"
      -]New value: +[
      +  "file_path"
      +]
  3. Changed5 schema fields changedv1.6.1
    • addedInput schema / properties / include_textboxes
      Added value: +{
      +  "default": false,
      +  "type": "boolean"
      +}
    • addedInput schema / properties / live
      Added value: +{
      +  "default": "auto",
      +  "type": "string"
      +}
    • addedOutput schema / properties / result / anyOf
      Added value: +[
      +  {
      +    "items": {},
      +    "type": "array"
      +  },
      +  {
      +    "additionalProperties": true,
      +    "type": "object"
      +  }
      +]
    • removedOutput schema / properties / result / items
      Removed value: -{}
    • removedOutput schema / properties / result / type
      Removed value: -"array"
  4. First observedv1.2.1

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, the description discloses the 500-match cap, the file-mode-only constraints, the effective-formatting resolution chain, query=None behavior, and the live vs file mode split. This is rich behavioral context that annotations alone do not 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 compact but information-dense: core purpose first, then mode-specific details, then routing. Every clause adds either a constraint, a behavior, or an alternative, with no filler.

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?

Given the output schema exists, return values do not need elaboration. The description covers the main behavioral branches, file/live modes, formatting resolution, caps, and the relevant sibling tool, making it complete for a tool with this complexity.

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

Parameters4/5

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

With only 13% schema description coverage, the description carries most parameter meaning: formatting, include_textboxes, scope, regex constraints, live behavior, and query=None semantics. It does not explicitly explain context_chars, though the phrase 'returns locations plus context' plus the parameter name partially covers it.

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 a specific action ('Find text in paragraphs and table cells'), names the returned artifact ('locations plus context'), and distinguishes itself from get_text by pointing to the known-range case. It also mentions formatting and textbox modes, making the tool's scope unmistakable among siblings.

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

Usage Guidelines5/5

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

It explicitly routes to get_text when reading a known range, states that formatting and textbox searches are file-mode only, and clarifies when live documents are searched ('Plain queries search open documents live'). The read-only note and file/live distinctions provide concrete when-to-use guidance.

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