Skip to main content
Glama

device_data_query

Authorize and read device files with whitelist validation, desensitization, and audit logging. Returns structured content without exposing raw paths.

Instructions

设备侧数据面授权读取(G10):设备门禁 → 目录白名单校验(默认空=全拒,opt-in)→ 读取 → 脱敏管线(敏感字段不出设备)→ 审计留痕 + 计量进 worklog。返回结构化内容(不落原始路径)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes请求读取的文件路径(设备侧绝对路径,须在白名单内)
identityYes设备身份码(AgentIdentity JSON——须过 gateDevice 闸门)
max_bytesNo读取上限字节(缺省 64KB)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.4.9

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations provided, the description carries full disclosure responsibility. It transparently describes the default-deny whitelist (默认空=全拒), the desensitization pipeline that keeps sensitive fields on-device, and side effects like audit trailing and worklog metering. It also states that raw paths are not persisted, which is a meaningful behavioral guarantee.

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?

A single dense sentence uses an arrow pipeline to front-load the purpose and then enumerate each stage. Every phrase adds value, from the gate to the audit trail, with no filler or repetition.

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, this description covers the key contextual elements: security gates, default-deny policy, side effects, and output shape. It could be more explicit about the exact structure of the returned content and potential failure modes, but it is substantially complete for an agent to invoke correctly.

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 schema already documents all three parameters with 100% coverage, so the baseline is 3. The description adds general context about whitelist validation and non-persistence, but it does not add specific parameter-level semantics beyond what the schema provides.

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 opens with '设备侧数据面授权读取' (authorized read of device-side data), clearly naming the verb (read) and resource (device-side data plane). It distinguishes itself from siblings like device_data_push and data_push by framing this as a read operation with an explicit authorization pipeline.

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 gives clear context: this is the tool for authorized reads of device-side data, with a mandatory identity gate and whitelist. It does not explicitly name alternative tools or state when not to use it, but the '读取' (read) framing plus the context of audit and metering makes the intended usage unambiguous.

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

Deploy Server

Other Tools