Skip to main content
Glama

os_read_file

Read text files on Android with auto root and truncation for large files. Use for config files like XML, JSON, YAML, or conf; avoid binary formats.

Instructions

[Binary/reverse-engineering tool. Use when: disassembly, radare2, r2, debugging, vulnerability research, ELF/PE/SO/DEX analysis.] 【r2ai逆向工具】📄 [文本读取] 读取文件的文本内容 (基于 cat)。 ⛔ 警告:严禁读取二进制文件 (如 .so, .db, .apk, .dex, .png),会导致输出乱码甚至服务崩溃!二进制文件请务必使用 r2_open_file 进行分析。 特性:自动 Root 提权,自动截断超大文件 (>50KB),适合读取 xml/json/yaml/conf 等配置文件。 【触发场景】当用户询问二进制逆向分析、反汇编、漏洞挖掘、radare2命令执 行、调试相关问题时,必须优先调用此工具。 【使用规则】调用前必须确认用户提供了目标文件的绝对路径,禁止捏造不存在的文件路径或命令结果,session_id 不再使用时必须关闭。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes目标文件的绝对路径

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.3

TDQS

B3.3/5.0
Behavior4/5

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

With no annotations, the description carries the transparency burden and largely succeeds: it discloses auto-root escalation, automatic truncation over 50KB, cat-based read behavior, and the crash risk of reading binary files. It could add more about output format or root side effects, but the key behaviors are clearly stated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is overlong and repetitive, mixing English and Chinese with duplicate trigger/usage blocks. The misleading first line and repeated warnings could have been condensed into a single clear section; structure is front-loaded but bloated.

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

Completeness3/5

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

For a one-parameter text-reading tool, the description covers the necessary safety and usage context: path validation, no binary files, truncation, and root escalation. However, the contradictory reverse-engineering trigger and the orphaned instruction about closing a session_id (which is not a parameter of this tool) leave the overall context incomplete and potentially confusing.

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 schema already documents the single 'path' parameter with 100% coverage, giving the baseline of 3. The description adds practical semantics beyond the schema by requiring an absolute path and explicitly prohibiting fabricated or non-existent paths.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The core operation is clear: '读取文件的文本内容 (基于 cat)' identifies a text-file reader for a path. However, the opening line calls it a 'Binary/reverse-engineering tool' for disassembly/r2/debugging, which directly conflicts with its actual behavior and the explicit warning not to read binaries, severely muddying what the tool is for.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit exclusions and alternatives: binary files must go to r2_open_file, and callers must provide a real absolute path. But the '触发场景' says this tool must be prioritized for binary reverse engineering, which contradicts the binary warning and makes the when-to-use guidance unreliable.

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