Skip to main content
Glama

get_text

Read-only

Retrieve structured paragraph data from Word documents, including styles and indexes. Filter by content, slice by paragraph range, or include text boxes to extract the exact text you need.

Instructions

Read body paragraphs as [{index, text, style, ...}] with effective styles. start/end slice by paragraph index (0-based, end EXCLUSIVE); contains filters. include_textboxes=True appends text-box content as labeled extras, body indices untouched; textbox=true (or {"index": n}) returns ONLY text-box content, with the box_index set_textbox_text (media-forms pack) takes; file-mode only. Open documents read live, same shape. Equations read via list_elements type='equations'. Read-only. Orientation: get_document_view.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNo
liveNoauto
startNo
textboxNo
containsNo
file_pathYes
include_textboxesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.0.0
    • addedInput schema / properties / textbox
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
  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?

Annotations already provide readOnlyHint=true, and the description reiterates 'Read-only' without contradicting it. It adds substantial behavioral detail: 0-based end-exclusive slicing, filter behavior, include_textboxes preserving body indices, textbox-only mode returning labeled box content with box_index, and live/open-document behavior.

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 is front-loaded with the core purpose and dense with relevant behavioral rules; no filler. The telegraphic style, especially the textbox/media-forms clause, is terse to the point of awkwardness but still packs the necessary information.

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?

With an output schema present and a read-only annotation, the remaining burden is call behavior, which the description mostly covers: slicing, filtering, textbox modes, file-mode restriction, live documents, and sibling routing. Small omissions like exact contains matching semantics and the acceptable values for live keep it from being fully complete.

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?

Input schema has 0% description coverage, so this description is the only source of parameter meaning. It explains start/end semantics, contains, include_textboxes, and textbox; file_path is self-evident. The 'live' parameter is only indirectly touched by 'Open documents read live, same shape,' leaving a small gap, but the main parameters are meaningfully annotated.

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?

Description states a clear verb+object: 'Read body paragraphs as [{index, text, style, ...}] with effective styles.' It further scopes by start/end/contains and textbox modes, and distinguishes itself from list_elements for equations and get_document_view for orientation, so it is not confused with 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 names two explicit alternatives: equations should be read via list_elements type='equations' and orientation via get_document_view. It also specifies when textbox mode is relevant ('file-mode only') and that open documents are read live. This is enough for an agent to decide when to call this tool rather than a sibling.

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