Skip to main content
Glama

wps_word_get_paragraphs

Read-onlyIdempotent

Retrieve paragraph structure from an active Word document to identify text, styles, and character positions. Use it to map template sections and locate fill-in fields before editing.

Instructions

获取Word文档的段落结构信息,返回每段的文本、样式和字符位置。

使用场景:

  • "了解文档的结构"

  • "查看文档有哪些段落"

  • "帮我看看模板里有哪些需要填写的位置"

  • 在填写模板前,先读取文档结构以识别填写位置

返回信息包括:段落索引、文本内容、样式名称、字符起止位置。 支持分页获取(startParagraph/endParagraph),默认返回前50段。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
end_paragraphNo结束段落索引,默认为起始+49
start_paragraphNo起始段落索引(从1开始),默认1

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0-hardened.1

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and idempotentHint=true, so the safety profile is covered. The description adds value by disclosing the return fields (paragraph index, text, style, character start/end) and the pagination behavior (startParagraph/endParagraph, default first 50 paragraphs). This goes beyond annotations and helps the agent understand what to expect from the call.

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 well-structured: a concise purpose sentence, followed by bullet-pointed use cases, then return info and pagination. It is not overly verbose, and the most important info (purpose and return fields) is front-loaded. The use-case list adds practical guidance without bloating the text. Slightly longer than necessary but effective.

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 read-only tool with no output schema, the description covers essential aspects: what it returns (fields listed), how pagination works, and the default limit. It does not specify the exact JSON response format, but that is not critical for a simple getter. Given the tool's low complexity and existing annotations, the description is complete enough for correct invocation.

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?

Schema description coverage is 100%: both parameters (start_paragraph and end_paragraph) have clear descriptions with defaults and ranges. The description adds a bit of context about pagination and the default 50-paragraph limit, but this is largely redundant with the schema's 'default start+49' for end_paragraph. Since the schema already explains the parameters well, the description does not significantly enhance parameter understanding.

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 clearly states the tool's purpose: retrieving paragraph structure information from a Word document, including text, style, and character positions. It uses a specific verb ('获取') and resource ('段落结构信息'), and the use-case list distinguishes it from siblings like wps_word_get_document_text (full text) and wps_word_find_in_document (search). The scope is unambiguous.

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 explicit use cases (e.g., understanding document structure, identifying fill-in positions in templates) and even suggests when to invoke it before filling a template. However, it does not explicitly mention when not to use this tool or compare with alternatives like wps_word_get_document_text, so it lacks exclusions. Still, the context is clear enough for an agent to infer appropriate usage.

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