Skip to main content
Glama

wps_word_get_document_text

Read-onlyIdempotent

Retrieve text content from the active Word document, optionally specifying a start and end position to extract a portion of the text.

Instructions

获取当前Word文档的文本内容。

使用场景:

  • "读取文档内容"

  • "获取文档的前100个字符"

  • "查看文档从第50到第200个字符的内容"

可指定起始和结束位置来获取部分文本。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNo结束位置(字符索引),默认到文档末尾
startNo起始位置(字符索引),默认从头开始

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0-hardened.1

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and non-destructive behavior, so the safety profile is covered. The description adds the partial-range behavior via start/end parameters, but it does not explain return format, edge cases, or what 'current document' means concretely.

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 compact and front-loaded with the core purpose, followed by useful examples. The examples are slightly redundant with the main sentence but still earn their place by clarifying partial-text use cases.

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 a simple read-only tool with two optional, fully documented parameters and safety annotations, the description is largely complete. It could explicitly mention the return value being a string, but this is strongly implied by the tool name and description.

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 describes both start and end as character index positions with defaults, achieving 100% schema description coverage. The description reinforces this with usage examples but does not add new parameter semantics such as zero-based indexing or inclusive/exclusive boundaries.

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?

The description clearly identifies the operation: getting the text content of the current Word document. It is specific enough to be distinguished from siblings like wps_word_get_paragraphs, though it does not explicitly contrast itself with any sibling tool.

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 concrete usage scenarios (reading all text, first 100 characters, character range 50-200), which makes the intended use clear. However, it does not state when to prefer an alternative tool or when not to use this tool.

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