Skip to main content
Glama

termux_save_script

Save code to an Android Termux sandbox directory with automatic folder creation, executable permissions, and ownership correction, making scripts ready to run immediately.

Instructions

[Binary/reverse-engineering tool. Use when: disassembly, radare2, r2, debugging, vulnerability research, ELF/PE/SO/DEX analysis.] 【r2ai逆向工具】💾 [编程] 将代码保存到 AI 专属沙盒目录 (/data/data/com.termux/files/home/AI)。 特性:自动创建目录、自动赋予执行权限 (+x)、自动修正文件所有者。 用法:保存后,立即使用 termux_command('python filename.py') 运行 。 【触发场景】当用户询问二进制逆向分析、反汇编、漏洞挖掘、radare2命令执行、调试相关问题时,必须优先调用此工具。 【使用规则】调用前必须确认用户提供了目标文件的绝对路径,禁止捏造不存在的文件路径或命令结果,session_id 不再使用时必须关闭。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYes代码内容
filenameYes纯文件名 (例如 'scan.py')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.3

TDQS

B3.4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full disclosure burden and does substantial work: it reveals the exact destination directory, automatic directory creation, automatic +x permission granting, owner correction, and the expected follow-up execution pattern. The main deductions are the inaccurate 'Binary/reverse-engineering tool' categorization and the ghost instruction about closing a session_id when no such parameter exists in the schema. The disclosed side effects go well beyond what the schema could convey.

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 bloated and repetitive: the trigger scenario is stated twice in nearly identical terms (the opening 'Use when' list and the 【触发场景】 block), and the 'session_id must be closed' sentence is irrelevant given the parameter list. The genuinely useful information (save location, auto-permissions, run-after pattern) is buried under boilerplate, and the description leads with a misleading category label rather than the actual function. This is over-specification with noise, not concise structure.

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 simple save tool the operational essentials are covered: destination directory, automatic side effects, and the post-save run command. But with no annotations and no output schema, the description should also clarify return/error behavior and overwrite semantics, which are absent. More critically, the internal inconsistencies — pure filename vs. absolute path, and the phantom session_id instruction — leave an agent genuinely uncertain about how to construct a correct call. Adequate but with clear gaps.

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?

Schema description coverage is 100% (content = code content, filename = pure filename), so the baseline is 3. The description adds modest value by clarifying that the filename lands inside the sandbox directory and that content is expected to be runnable code (python filename.py). However, the 'confirm the absolute path of the target file' rule actively contradicts the schema's definition of filename as a pure name, which prevents a higher score.

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 states a specific verb+resource — save code to the AI sandbox directory (/data/data/com.termux/files/home/AI) — and names concrete behaviors (auto-create directory, auto-chmod +x, auto-fix owner). However, it opens by mislabeling the tool as a 'Binary/reverse-engineering tool' and later references session_id cleanup, which muddies what the tool actually is and blurs its boundary with the r2_* siblings. The core purpose is clear, but the framing is noisy enough to keep it from a 5.

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?

The description gives explicit usage context: a trigger list (binary analysis, disassembly, radare2, debugging, vulnerability research) and an explicit pairing with the sibling termux_command ('after saving, immediately run termux_command(...)'), plus an anti-fabrication rule. However, the 'must prioritize this tool' mandate for disassembly/radare2 questions misroutes the agent away from more appropriate siblings like r2_disassemble or r2_run_command, and the precondition that the user provide an absolute target path directly contradicts the schema's 'pure filename' parameter. Explicit guidance exists, but parts of it are misleading.

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