Skip to main content
Glama

find_text

Read-only

Locate text in Word documents by searching paragraphs, table cells, and optional textboxes; returns match locations with context. Filter by formatting or plain query to find specific 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
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. 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"
      +]
  2. 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"
  3. First observedv1.2.1

TDQS

A4.7/5.0
Behavior5/5

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

Despite readOnlyHint already covering safety, the description discloses substantial behavioral detail: the 500-match cap for live plain queries, effective formatting resolution through run, style chain, and defaults, query=None returning every formatted stretch, and labeled text-box matches. These traits are not inferable from annotations or the schema.

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 description packs a lot into five dense sentences and front-loads the core purpose. It is efficient, though the run-on semicolon structure and repeated 'file-mode only' make it slightly harder to parse than necessary.

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

Completeness4/5

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

For an 8-parameter tool with no schema descriptions, the description covers the major modes, limitations, and output shape, and an output schema exists. It is not fully complete because live values, context_chars, and regex behavior for plain queries are not explicitly specified, but the essential calling context is present.

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 0% schema description coverage, the prose has to explain the parameters, and it does for formatting, scope, include_textboxes, query, and live mode. However, context_chars is left to inference, and the regex parameter's exact applicability is only implied by the phrase 'file-mode, no regex.'

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 opening clause states a specific action and resource: 'Find text in paragraphs and table cells; returns locations plus context.' This clearly distinguishes the tool from siblings such as get_text, and the final sentence reinforces that distinction by routing known-range reads to get_text.

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?

The description gives explicit mode guidance: text-box and formatting searches are file-mode only, while plain queries can run live on open documents. It also provides an explicit alternative: to read a known range, use get_text. This lets an agent choose correctly without inspecting sibling schemas.

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