Skip to main content
Glama

wps_common_get_selected_text

Read-onlyIdempotent

Read the currently selected text in the active WPS document. Works for Word, Excel, and PPT to access user-selected content.

Instructions

获取当前文档中选中的文本内容。

使用场景:

  • "读取我选中的内容"

  • "获取当前选区的文字"

  • "看看我选了什么"

特点:

  • 返回当前选区的纯文本内容

  • 适用于Word、Excel、PPT

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0-hardened.1

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering the safety profile. The description adds that it returns '纯文本内容' (plain text) of the current selection, which informs the agent about the output format, and specifies that it works for Word, Excel, and PPT, clarifying its scope. No contradictions with annotations; it adds context beyond them.

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 concise and well-structured. It leads with the primary purpose in the first sentence, then uses bullet points to list usage scenarios and features. Each sentence serves a purpose: stating what it does, giving examples of user requests, and describing the return type and applicability. There is no fluff or redundancy.

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?

The tool is simple (no parameters, no output schema) and the description covers the key aspects: what it returns (plain text), where it works (Word, Excel, PPT), and typical usage scenarios. It doesn't mention edge cases like 'no selection' or error behavior, but these are minor and not critical for an agent to call it correctly. Given the simplicity and strong annotations, it is sufficiently 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?

The tool has zero parameters, so the schema coverage is 100% by definition. The description does not need to explain any parameters, and it doesn't. The baseline for 0 parameters is 4, and since there is nothing to clarify, this score is appropriate.

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: '获取当前文档中选中的文本内容' (get the text selected in the current document). It explicitly lists the supported applications (Word, Excel, PPT) and gives concrete usage examples, making it easy to distinguish from the more specialized sibling tools like wps_excel_get_selection or wps_word_get_document_text. The verb 'get' and resource 'selected text' are specific and 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 clear usage scenarios with example user utterances ('读取我选中的内容', '获取当前选区的文字', '看看我选了什么') that indicate when to invoke this tool. It also states that it applies across Word, Excel, and PPT, implying it is the common choice for reading selection across all these apps. It does not explicitly name alternatives or exclusion conditions, but the cross-app scope gives enough context to select it over app-specific tools.

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