Skip to main content
Glama
HyperClockUp

DrissionPageMCPServer_Modified

by HyperClockUp

get_element_text

Extract text content from web elements using precise selectors. Verify element text before interactions, capture dynamic page data, and confirm element visibility in browser automation.

Instructions

获取元素文本内容(精确定位版)

        ⚠️ 重要提示:这是预处理工具,用于获取精确的元素信息!
        使用场景:
        1. 🔍 在点击或输入操作前,验证目标元素的实际文本内容
        2. 📋 获取页面动态内容,如表格数据、状态信息等
        3. ✅ 确认元素存在性和可见性
        
        🎯 选择器构建原则:
        - 必须基于 get_dom_tree() 或 find_elements() 的结果
        - 禁止猜测元素选择器
        - 优先使用ID、class、属性选择器
        
        Args:
            selector: 元素选择器(必须基于实际DOM结构)
            
        Returns:
            str: 元素的文本内容,如果元素不存在则返回错误信息
            
        💡 最佳实践示例:
        - 正确:先 find_elements(".status") 确认元素,再 get_element_text(".status")
        - 错误:直接 get_element_text("#可能的状态元素") 而不确认
        

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by disclosing important behavioral traits: it explains this is a preprocessing tool for precise element information, describes what happens when elements don't exist (returns error message), and provides selector construction principles. It doesn't mention rate limits or authentication needs, but covers most essential behavioral aspects.

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 with clear sections (important note, use cases, selector principles, args/returns, best practices) but could be more concise. Some sections like the best practice examples are helpful but slightly verbose. Overall, most content earns its place by providing valuable guidance.

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

Completeness5/5

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

Given the tool's complexity (element interaction with precise selectors), no annotations, and an output schema that only specifies return type, the description provides excellent completeness. It covers purpose, usage guidelines, behavioral context, parameter semantics, and best practices - everything needed for an agent to use this tool correctly in the context of sibling browser automation tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage for the single parameter, the description fully compensates by providing rich semantic context: it explains the selector must be based on actual DOM structure from get_dom_tree() or find_elements(), gives construction principles (prioritize ID, class, attribute selectors), and warns against guessing selectors. This adds substantial meaning beyond the bare schema.

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 as '获取元素文本内容(精确定位版)' (get element text content - precise positioning version), specifying both the verb (get) and resource (element text content). It distinguishes from sibling tools like get_page_text by emphasizing precise element-level retrieval rather than whole-page text extraction.

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 provides explicit guidance on when to use this tool versus alternatives: it lists three specific use cases (verifying text before click/input, getting dynamic content, confirming element existence/visibility) and gives clear best practice examples showing when to use this tool versus find_elements. It also explicitly states this is a '预处理工具' (preprocessing tool).

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/HyperClockUp/DrissionPageMCPServer_Modified'

If you have feedback or need assistance with the MCP directory API, please join our Discord server