Skip to main content
Glama

page_getData

Efficiently retrieve page data with path projection to avoid token limits. Supports wildcards, array lengths, negative indexes, and byte truncation.

Instructions

获取当前页面的数据对象。三种模式:1) 无参 → 返回整树(小心 token 限制);2) 传 path → 返回单个子路径;3) 传 paths[] → 按多路径投影(推荐用于大对象,支持 conversationHistory[*].aiStatus 这种 wildcard 语法、conversationHistory.lengthconversationHistory[-1].aiStatus 负索引)。默认 maxBytes=50000 字节硬截断,超出返回 truncated=true 标识。paths 与 path 互斥时 paths 优先。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNo
pathsNo
maxBytesNo
connectionNo可选连接覆盖(不传则用默认会话)。可用字段:mode(launch|connect)、cliPath、projectPath、wsEndpoint、timeout、port(【自动化端口】→ cli auto --auto-port,默认 9420;不是 IDE HTTP 服务端口,别把 IDE 服务端口传进来)、account、ticket、trustProject、args、cwd、autoClose、autoLaunch、launchTimeout、connectTimeout。
Behavior4/5

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

Without annotations, the description discloses key behaviors: three retrieval modes, wildcard/negative index support, default maxBytes with truncation, and the truncated flag. It doesn't cover error handling or permissions, but these are reasonable omissions for a getter tool.

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 with enumerated modes. Every sentence adds value, no redundancy. Information is dense yet easy to parse.

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 getter with no required parameters and no output schema, the description adequately covers how to invoke it and what to expect (data object with possiblly truncated flag). It could be improved by specifying the return shape or error scenarios, but it's sufficient for an AI agent.

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?

Schema coverage is low (25% only for connection), but the description adds rich semantics for path, paths, and maxBytes, explaining wildcard syntax, negative indexing, default value, and truncation behavior. The connection parameter relies on its schema description.

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 states the tool retrieves the current page's data object and details three usage modes. While it doesn't explicitly differentiate from sibling tools like page_expectData, the purpose is well-defined 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 guidance on when to use each mode (no param for full tree, path for single sub-path, paths for multi-path projection with wildcards). It recommends paths for large objects and explains the truncation behavior, but lacks explicit alternatives or when-not-to-use scenarios.

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/Chaixueyuan/weapp-agent-mcp'

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