GameMod MCP
Integrates with Mono/.NET managed assemblies to parse metadata, enumerate classes, fields, methods, and tokens, and hook runtime methods for modding .NET/Mono games.
Targets Unity games via IL2CPP or Mono backends, enabling metadata indexing, class/field/method discovery, runtime hooking, and memory read/write for game modding.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@GameMod MCPfind the gold field in the save service of the running game"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
GameMod MCP
用元数据定位 Hook 落点的游戏 Mod 工具集 —— 一个 MCP 服务器,让任意通用 Agent(Claude Code / Codex / Cursor / …)都能做游戏 Mod。
支持 IL2CPP、Mono (.NET)、Unreal 三类引擎,45 个工具覆盖 「找游戏 → 建索引 → 查类/字段/方法 → 注入 → Hook → 读内存」全流程。
它解决什么问题
传统做法是拿内存修改器(Cheat Engine 式)反复搜值、改值、再筛。 问题在于:每一次都是在猜,游戏一更新全部作废,而且改完不知道为什么生效。
本工具集换一条路:游戏自己就带着完整的类型系统。
传统 CE 式 | GameMod MCP | |
怎么找 "金币" | 反复搜内存值、改值、再筛 | 查元数据拿到 |
怎么找函数 | AOB 特征码猜机器码 | 查元数据拿方法 token,注入后用 token 对账换算出真实地址 |
稳定性 | 游戏更新即失效 | 元数据变了才失效,且自动重建缓存 |
靠猜吗 | 靠猜(试错) | 基本不靠猜(可枚举、可比对、可验证) |
注意两侧的分工:静态元数据没有字段偏移、也没有方法地址(只有 token)。 偏移与地址一律来自注入后的运行时探针,
token是把两侧对上的钥匙。
具体做法是两段式:
离线解析元数据 —— IL2CPP 的
global-metadata.dat、Mono 的托管 dll。 拿到类型、字段、方法、token 的完整清单。在线问运行时 —— 注入 Frida 探针,问游戏「这个字段真实偏移多少 / 这个方法真实地址在哪」。两边的 token 对上号,就是「我挂的确实是 我想挂的那个方法」的硬证据。
AOB 扫描(scan_pattern)保留,但只是符号被剥离时的兜底。
Related MCP server: Frida MCP Server
快速开始
1. 装依赖
pip install -r requirements.txt # 只有 mcp + frida引擎解析器(PE / IL2CPP / Mono)全部手写、只用标准库,不依赖
pefile / lief / 任何反编译框架。
一键安装(含冒烟测试):
python install.py # 主推:纯 Python,Windows 自带 PowerShell 5.1 读不了
# 无 BOM 的 UTF-8 中文脚本(会语法报错),而 pwsh 不一定装了
python install.py --vision # 连可选弱视觉(截图 / OCR)一起装本项目只支持 Windows。
install.ps1仍保留,但只能用pwsh(PowerShell 7)跑 —— 用 Windows 自带的powershell(5.1)会因中文编码问题直接语法报错。
2. 接进你的 Agent
各客户端的现成配置在 mcp-config/,支持
Claude Code、Codex CLI、Cursor 以及任何标准 MCP 客户端。
以 Claude Code 为例,项目根目录建 .mcp.json:
{
"mcpServers": {
"gamemod": {
"command": "python",
"args": ["C:/path/to/GameModMCP/src/gamemod_mcp/server.py"],
"env": {
"PYTHONPATH": "C:/path/to/GameModMCP/src",
"PYTHONUTF8": "1"
}
}
}
}3. 让 Agent 加载 skill
把 skills/gamemod-mod/ 放进你的 Agent 的
skill 目录。它包含完整工作流、各引擎差异、7 个配方(含 Unreal 路线)、以及一份
「查不到东西怎么办」的排查表——这是让 Agent 少走弯路的关键。
4. 开跑
你:帮我找到 Garden of Witches 里的存档服务,看看金币字段叫什么
Agent 会自动:
get_diagnostics() → 确认 Frida 可用
inspect_game(...) → 识别为 IL2CPP
open_game(...) → 建索引(首次约 2s,之后 10ms)
search_fields("gold") → 定位候选字段
class_detail(...) → 确认所属类与类型
inject_process() → 注入探针
runtime_class_info(...) → 拿真实字段偏移工具一览(45 个)
本清单由
python devtools/gen_docs.py从代码生成(来源:各工具函数的 docstring 首段 +server.py的层节注释)。 不要手工编辑这一节 —— 下次--check会报红。 要改描述就改该工具的 docstring 首段,再跑python devtools/gen_docs.py --write。为什么改成生成:校验只能发现漂移,生成本不会产生漂移 —— 本表的工具数曾手工漂过 5 次以上。 改造前做过「知识上移」核对:原单元格里有 402 个特征词是 docstring 没有的, 直接生成会丢掉那些手写事实,所以先把它们补进了 docstring 首段。
发现层
工具 | 作用 |
| 列出正在运行的游戏进程,并识别其运行时(il2cpp / mono / 其它)。 |
| 分析 PE 文件(exe/dll):架构、节区、导出表、导入表、运行时类型。 |
| 探测一个游戏目录:识别引擎、找出主程序与关键文件。 |
会话层
工具 | 作用 |
| 关闭当前会话:卸载所有 Hook、断开注入、关闭索引。只有真的恢复原状才 |
| 查看当前会话状态:选中的游戏、索引统计、运行时注入情况。 |
| 选定游戏,并构建(或复用)它的元数据索引(跨引擎自动识别)。 |
静态查询层(不需要游戏在运行)
工具 | 作用 |
| 分析一个类型引用了哪些其它类型(字段/父类/方法返回类型)。近似,非精确调用图。 |
| 查看一个类的完整信息:字段(含类型)、方法(含 token)、继承链;给 |
| 查看类的继承体系(向上找基类、向下找派生类)。 |
| 反编译 Mono/.NET 程序集,拿到真正的 C# 源码(薄封装 |
| 找出所有继承自某个基类的类型(含间接继承);配 |
| 列出游戏里的程序集(dll)及各自的类型数量。支持 |
| 搜索游戏里的类、结构体、枚举 —— Mod 开发最主要的入口。支持按基类与程序集过滤。 |
| 按名字搜索字段,返回所属类与字段类型。按字段名搜(定位「金币」「血量」这类目标的首选入口)。 |
| 按名字搜索方法,返回所属类、返回类型与 token。 |
结果句柄层(大结果集翻页)
工具 | 作用 |
| 按句柄翻页读取之前某次查询的完整结果;给了 |
运行时层
工具 | 作用 |
| 取走探针缓冲的 Hook 事件(调用记录)。 |
| 在游戏进程内执行任意 Frida JS 代码 —— 应急逃生舱。 |
| 定位某个方法可 Hook 的地址(含 RVA 与 token)。同样支持完整嵌套名,歧义时拒绝。 |
| 枚举类的活对象实例(拿 |
| 暂停/恢复游戏的 GC(垃圾回收)。 |
| 在任意地址安装 Hook(不限于托管方法)。适用于原生函数、系统 API、以及「模块基址 + RVA」算出的地址。 |
| 在目标方法上安装 Hook,捕获它的调用(参数、调用来源、返回值)。用 |
| 列出当前所有 Hook 及其触发次数。 |
| 把运行时探针注入正在运行的游戏进程。目标换了游戏时会把会话身份与索引一起换过去,并在返回里给 |
| 启动游戏并在游戏初始化之前注入探针(能抢在初始化前挂钩)。 |
| 读取某个实例或静态字段的原始值(静态字段传 |
| 读取游戏进程内存(十六进制返回)。 |
| 查类的运行时实况:真实字段偏移与方法真实地址(RVA)。 |
| 查看已注入游戏的探针状态:IL2CPP 模块、映像数量、可用 API。含静态/运行时一致性自检( |
| 在游戏模块里做 AOB(特征码)扫描。这是兜底手段 —— 优先用元数据 + RVA 定位。 |
| 写对象字段值( |
| 卸载 Hook。hook_id 留空则卸载全部。 |
| 写游戏进程内存。 |
弱视觉 / UI 层(截图 · OCR · 日志 · 等待)
工具 | 作用 |
| 截屏 / 截窗口存盘并返回路径(不回 base64)。截图是证据、不是判据;窗口找不到会如实失败,不静默改截整屏。 |
| OCR 识别文本并给屏幕绝对坐标(可直接用于点击)。只对给定 ROI 做(实测整屏 4.1s vs ROI 数十 ms)。 |
| 读游戏日志尾部并按正则过滤(编码自动 utf-8/gbk)。只读、不消费,可反复轮询。 |
| 出一份可证伪的验收结论:每条断言独立求值,并要求足够多的独立证据才判成立。 |
| 轮询等待条件成立并给出证据包(验收闭环里「等到可以判了」那一步)。五种条件: |
Unreal 引擎层
工具 | 作用 |
| 判断一个 exe 是否为 Unreal 引擎游戏,并给出可核查的证据与置信度。 |
| 列出 .pak / .utoc 里打包了哪些资产(可按名字过滤、翻页)。返回 |
| 读取 UE 的打包清单 |
| UE 游戏概况:容器、清单、脚本模块。汇总一个 Unreal 游戏的可提取信息(资源容器、清单、脚本对象)。 |
| 从 UE 游戏 exe 里提取 /Script/ 模块名与对象路径。失败时按契约给 |
诊断层
工具 | 作用 |
| 检查运行环境:Python、Frida、各引擎解析器是否可用。默认不扫本机进程(见 |
句柄格式与作用域
句柄形如 il2cpp-g3-classes-1({引擎}-g{代次}-{种类}-{序号})。
代次段是正确性要求:句柄表是每个索引实例各自的、序号从 0 重来,
不带代次就会让旧句柄在切游戏后静默读到另一个游戏的结果集(实测过)。
所以切游戏或重建索引后旧句柄一律失效,失败时会返回 available_handles。
见 devtools/verify_handle_scope.py。
响应体积上限(256 KB)
任何工具返回都不会超过 256 KB —— 这不是各工具自觉,而是
src/gamemod_mcp/cap.py 在所有工具外面统一兜底(@_cap_response)。
超限时截断最大的那个顶层列表,并把完整列表登记成句柄:
返回里多出
capped: true、cap_bytes,note写明「只回了前 N 条」;has_more一律改成true、returned改成实际条数(不许明明还有却说没有);note里给出续读方式read_query_result(handle=..., offset=N), 一条数据都不会丢 —— 完整列表在句柄里。已有
handle的返回(search_*)复用它的句柄,不再另造一个; 此时续读的offset是「原 offset + 已回条数」,按「已回条数」算会跳过前面的条目。
为什么必须有:契约第 5 条原先只靠各工具的 limit 自觉遵守,但 limit 上限是
2000,Agent 完全可以合法地要 2000 条 —— 实测 search_classes('', limit=2000)
的线上文本是 856 KB。截断后同一调用是 260 KB。
见 devtools/verify_cap.py(机制)与 devtools/verify_response_size.py(体积)。
资源(MCP resources)
只有一个:gamemod://guide —— 这份 MCP 自己的完整使用指南
(与 skills/gamemod-mod/SKILL.md 同源,逐字节相同)。
gamemod://guide text/markdown 约 24 KB支持 resources 的客户端可以直接读它,不必先在系统提示里塞进这份长文档。
它也是全项目唯一没有工具出口的内容:其余(会话状态、引擎能力矩阵、
缓存与依赖清单)都已经由 get_session / open_game / get_diagnostics
返回,再开一个资源出口就是同一份数据的第二个来源(契约第 3 条)。
为什么没有 prompts
MCP 还有 prompts 这一面,本服务器不做,这是量过的结论而不是遗漏:
协议面 | 客户端(DSH)实测 | 结论 |
| 客户端实现了,且把资源包成给模型用的工具(模型够得着) | ✅ 做 |
| 客户端一个 prompt 方法都没有,也没有对应的包 | ❌ 不做 |
证据:在 E:\DSH\resources\app.asar 里按路径检索 JS,
dsh-mcp-client 的请求分发 switch 里只有 resources/* 三个分支,
prompts/* 零命中。加了 prompt 也传不到模型面前,
只会是一份没人读的声明 —— 与当初否决 outputSchema 是同一套判断方式
(见 docs/项目梳理与优化建议.md §4.14 附近)。
反过来说:换个客户端就要重新量一次。如果某个客户端确实消费 prompts, 「把 SKILL.md 挂成带
engine参数的 prompt」是现成的做法。devtools/verify_mcp_resources.py已经把「资源清单恰好只有 guide」 做成断言,将来补资源时会强制过一次讨论。
人工调试前端(旁路设施)
给人工调试用:在浏览器里看有哪些工具、怎么调、返回什么, 并留下 AI 客户端到底调了什么的流水,便于回溯。
python devtools\debug_ui.py # → http://127.0.0.1:8770/
python devtools\debug_ui.py --log-on # 本次启动就打开调用流水
# 装过包之后也可以:gamemod-mcp-dbg-ui它不重新实现任何工具:工具清单直接问 FastMCP.list_tools(),
入参表单由每个工具的 inputSchema 生成,调用直接走 FastMCP.call_tool()。
所以页面上看到的参数表、返回体与 AI 客户端拿到的是同一份,
不存在「前端能调通、AI 调不通」这种漂移;ok:false 的真实报错也照样显示。
左侧按 server.py 的八个「工具分层」分组,只读 / 破坏性 / 接触外部世界
直接取 MCP 的语义标注。
调用流水(可开关 / 可查看 / 可清理)
页面第二个页签是调用流水:每次调用记下工具名、参数、返回、ok、错误、
耗时、体积。默认关闭,页面上可以随时开关。
日志点落在服务器分发层,而不是前端里 —— 这一点是刻意的:
前端只能看见「经它发出的调用」,而 AI 客户端会自己拉起一个 MCP
服务器进程,前端根本看不见。记在 ToolManager.call_tool(FastMCP
分发工具的唯一入口)上,人工手调的(source: "ui")与 AI 调的
(source: "mcp")才会落进同一份流水,靠 source / pid 区分。
verify_debug_ui.py 用另一个进程的 stdio 客户端把这件事验成了断言。
环境变量 | 作用 | 默认 |
|
| 关 |
| 流水文件 |
|
| 单文件上限,超过则轮转 | 8 MB |
| 保留份数(含当前) | 4 |
三条约束都做成了断言:① 绝不影响业务 —— 记不上就不记(磁盘满 / 权限
不足 / 路径是文件),不许让一个本来正常的工具失败;② 不许无界增长 ——
超上限就轮转、只留最近几份,单条记录里的超大参数/返回截断并标 truncated;
③ 默认不占磁盘 —— 开关关着一个字节都不写。
这个前端不影响 MCP 业务:不起 stdio、不占 MCP 端口、不改任何工具实现, 关掉它 MCP 一侧完全不受影响。运行期依赖也没变(只用标准库
http.server,不引入 Flask/FastAPI/Node);对server.py的唯一改动 是一个默认关闭的流水钩子。详见devtools/verify_debug_ui.py(61 项)。
目录结构
GameModMCP/
├── README.md 本文件
├── pyproject.toml 打包配置(pip install -e . 可用)
├── requirements.txt 运行依赖(只有 mcp + frida)
├── install.py 一键安装(**主推**)+ 冒烟测试
├── install.ps1 同上,但**只能用 pwsh 7**(5.1 读中文会语法报错)
│
├── src/gamemod_mcp/
│ ├── server.py MCP 服务器(45 个工具)
│ ├── debug_ui.py 人工调试前端(HTTP,旁路设施;见下节)
│ ├── debug_ui.html 该前端的界面(单文件,无外部依赖)
│ ├── debuglog.py 工具调用流水(可开关 / 可查看 / 可清理)
│ ├── logutil.py 日志(只走 stderr,stdout 留给 JSON-RPC)
│ ├── engine/ 静态分析层
│ │ ├── pe.py 纯标准库 PE/COFF 解析器
│ │ ├── discovery.py 进程枚举 / 引擎识别(不再做全机 Steam 扫描)
│ │ ├── il2cpp_meta.py IL2CPP global-metadata.dat 解析器
│ │ ├── mono_meta.py ECMA-335 元数据解析器(45 张表)
│ │ ├── ue.py Unreal 提取器(pak / utoc / 清单 / 脚本对象)
│ │ ├── adapt.py **引擎适配层**(让索引层不关心引擎差异)
│ │ ├── decompile.py Mono 反编译薄封装(可选外部依赖 ilspycmd)
│ │ ├── index.py SQLite 索引 + 结果句柄
│ │ └── state.py 会话状态(发现→索引→运行时的粘合层)
│ └── runtime/ 动态分析层
│ ├── agent.js Frida 探针(IL2CPP 59 + Mono 56 个 API,双后端)
│ └── session.py Frida 生命周期管理
│
├── skills/gamemod-mod/SKILL.md Agent 使用指南
├── mcp-config/ 各客户端的 MCP 配置样例
├── agent_logs/ 子 Agent 委派记录(prompt + 产出)
└── devtools/ 验证脚本(见 devtools/README.md)
├── verify_*.py 验收脚本(对真实游戏与地面真值)
├── check_encoding.ps1 编码校验(UTF-8 无 BOM)
├── archive/ 归档的过程产物(不参与验收)
│ └── probes/ 一次性逆向侦察脚本(格式出问题时重启定位用)
└── groundtruth/ 真值来源(MonoGroundTruth / 官方 dump)引擎支持程度
IL2CPP | Mono (.NET) | Unreal | |
静态查询类型 | ✅ 完整 | ✅ 完整 | ❌ 无类型系统可查 |
字段类型精度 | ⚠️ 启发式(~90%) | ✅ 精确(ECMA-335 签名) | — |
字段偏移 | ✅ 运行时取 | ✅ 运行时取( | ❌ 需运行时,未实现 |
方法地址 | ✅ 运行时取(含 RVA) | ✅ 运行时取(JIT 机器码,无 RVA) | — |
运行时 Hook | ✅ | ✅(地址在 mono 模块外,直接按地址挂) | — |
GC 暂停 | ✅ | ❌ 本版 Mono 无 | — |
资源容器清单 | — | — | ✅ pak/utoc 100% 准确 |
可反编译出源码 | ❌(已转 C++) | ✅(ILSpy/dnSpy 接近源码) | ❌ |
两个引擎的运行时配方一致:注入 →
runtime_class_info取偏移 →find_hook_target取落点 →hook_method+drain_events。 探针里是两套实现(il2cpp_*59 个 API /mono_*56 个 API), 对外工具与 token 对账方式完全相同(静态 token == 运行时 token)。 Mono 上有四条差异,都是如实声明而非「未实现」:
没有 RVA:地址来自
mono_compile_method触发的 JIT, 代码不在mono-2.0-*.dll内,所以in_module: false且不给rva; 元数据里的 RVA 指向 IL 字节码,不能拿来 Hook。
gc_control不支持:没有mono_gc_disable/mono_gc_enable导出(四个 Mono 样本一致核实),调用会明确返回ok:false。程序集懒加载:刚注入时只枚举到十来个程序集,
UnityEngine.*要过几秒才出现(实测 13 → 164)。注入成功后探针会等它加载稳定再返回 (判据是数量连续 4 次采样不变,实测等了 4.0 秒、看到 144 个), 结果放在init.assemblies里;返回里的searched_images也会如实给出当前数量,若仍未稳定可稍后重试。 为什么必须等(不是保险起见):矩阵实测 Archon Soul 在只有 13 个程序集时 被 Hook 并强制调用get_frameCount,进程随后消失 —— 「注入成功」与「可以 Hook 托管方法」在 Mono 上不是同一件事。静态索引的范围:Mono 的静态索引默认只收游戏自己的程序集 (
Assembly-CSharp.dll),UnityEngine.*这类框架类型静态查不到。class_detail会明确说明这一点并指向runtime_class_info, 而不是只回一句「用 search_classes 搜短名」(那条路走不通,它压根没被索引)。
实测数据(真实游戏,非构造样本):
IL2CPP(Garden of Witches,17 MB 元数据): 20,072 类型 / 139,501 方法 / 81,872 字段 / 94 映像。 字段类型解析率 90.10%,与地面真值 dump 比对 27,264 条 0 错(100% 精度)。 建索引 2.6s,缓存复用 1.3s。
Mono(Archon Soul,Assembly-CSharp.dll): 1,387 类型 / 6,611 方法 / 6,343 字段。 与 Microsoft 官方
System.Reflection.Metadata交叉验证 45 张表 0 差异, 每类型的全名/基类/字段名/方法名 0 差异,签名解析 100%。 运行时(Frida 注入同一游戏,实测):mono_*导出绑定 56 个、零缺失(四个样本的 PE 导出表逐个核实); 程序集清单随游戏运行从 13 涨到 164(Mono 是懒加载,跨调用缓存会永久漏掉UnityEngine.*);UnityEngine.Time的 token0x020002e4与静态元数据 完全一致(Time.get_frameCount0x06002468亦然,独立复现了System.Reflection.Metadata真值);短名解析在 27,222 行类型定义里 0.1s 完成;Hook 上get_frameCount后捕获到真实返回值(游戏运行 14.5s 时retval=872,与 60fps 自洽)。方法地址是 JIT 机器码,in_module=false, 因此没有 RVA(不给假数据);gc_control如实报不支持。 另一个实测到的坑:游戏跑约 90 秒后,同一个程序集会被加载出两个映像,UnityEngine.Time于是被枚举出两条行号/token/命名空间/程序集名全同、 只有 klass 指针不同的记录 —— 不按(程序集名 + 命名空间 + 短名)去重的话, 一次本可解析的查询会变成「命中 2 个同名类」,而调用方无法消解 (两条的 image / namespace / full_name 一模一样)。顺带一提, 内存加载的程序集mono_image_get_filename返回的是data-00000219A9D5A040这种合成名,不是路径,按路径去重不会命中。 第四个样本 Gambonanza 上复现并修掉了「注入太早就 Hook」这个缺陷: 修复前注入后 4 秒时只有 15 个程序集,Transform/Time一律「没找到类」; 修复后注入即等到 144 个程序集稳定(4.0 秒),UnityEngine.Transform、UnityEngine.Time、UnityEngine.GameObject全部解析成功,find_hook_target给出候选,10 秒后进程仍在。Unreal(CatapultHero + Dinoblade 两个样本):
.pakv11/v12 索引与.utocv8 目录索引完整解析, 与打包清单交叉校验 4,556/4,556、4,565/4,565、7,178/7,178、18,956/18,956 全部 100% 命中; 含 UTF-16 中文路径(字库、精灵片、角色)正确解码。 FName 池、属性偏移、.usmap未实现——静态样本中不可得,诊断里如实标注。
可信度:怎么证明它是对的
这个项目不靠「看起来能跑」。devtools/ 下有 52 个可复现的验证脚本,
每个都对着真实游戏和地面真值跑(其中 43 个进自动套件,
verify_tool_coverage.py 是静态导航图、不是门禁,故不参加):
脚本 | 验证内容 |
| IL2CPP 元数据表结构与记录布局 |
| 《重启验证与运行时理解报告》§4 那 5 个缺陷的修复:同步工具不许占住事件循环(分发路径必须换线程)、探针 RPC 必须有超时且卡死时不假成功、失败的 |
| typeDefinitions 记录大小:按版本号硬编码会错(v29 实测是 88 不是 92,用错会让 Σfield_count 变 6.5 亿、 |
| 索引层:构建 / 缓存复用 / 各类查询 / 结果句柄 |
| 结果句柄惰性物化:用解析条数断言证明翻页只解析一页 |
| 结果句柄的作用域:跨游戏/重开索引的旧句柄必须被拒绝,不许读到另一个结果集 |
| 会话身份:切换游戏时上一个游戏的 |
| 上下文跟随目标: |
|
|
| 目录布局判定:容器目录(装着多款游戏的父目录)不许被当成某一个游戏、UE 不许被送去建索引、不支持的引擎要给出家族提示(真实样本 + 合成布局 + 进程级 stdio,含非空转反证) |
| 继承过滤反过来查:与旧的逐条判定逐条相等 + 邻接表只建一次 |
| 字段类型解析率与精度(对 27,264 条 dump 真值) |
| 方法参数:v31 记录里哪个偏移才是 |
| 跨引擎:同一套查询 API 吃 IL2CPP + Mono |
| Mono 解析器,对官方 |
| Mono 覆盖到的表 / 特性范围 |
| Mono 对畸形输入的健壮性 |
| UE 提取器对两个真实样本(pak / utoc,对打包清单) |
| Frida 运行时层 |
| 运行时定位 Hook 落点(token 对账) |
| 静态 token ↔ 运行时 token 交叉验证 |
| Mono 运行时探针:56 个 |
| 通过 MCP 工具层跑完整流程(IL2CPP) |
| 通过 MCP 工具层跑完整流程(Mono) |
| 通过 MCP 工具层验证 UE 能力真的接上了 |
|
|
| 补全主流程没覆盖到的工具 |
|
|
| 字段写入的编码( |
| 实例枚举的语义( |
| 弱视觉/UI 层( |
| 轮询等待与三态判定( |
| 证据充分性契约( |
| 不许再出现「注入需要管理员权限」这个错误说法(曾扩散到 8 处以上,源头是 |
| 响应体积:P2-4 前后对比(用 |
| 体积上限的机制:截断/句柄/字段诚实性/不丢数据(纯函数 + 端到端两层) |
| MCP 资源层: |
| P2-3 的决策门禁(不是行为测试):钉住「进度无消费方、取消够不着、tasks 会弄坏」这三条否决依据,变了就报红 |
| 进程级入口:脚本形式( |
| 子进程 stdout 不许污染协议: |
| 探针线程附着 IL2CPP 域:模块已加载 ≠ 域已建好(实测 6/9 个 IL2CPP 游戏上 |
| 运行时类解析的三条规则:只给短名要能解析到顶层类型(老版本在 4 个游戏上报「未找到类 Transform」)、三条路(短名/显式 namespace/完整名)必须指向同一个类(比字段偏移表)、嵌套类型只认完整嵌套名(反证:7056 个嵌套类型里挑一个短名不撞顶层的,短名必须查不到、完整名必须查到)、不存在的类要给出 namespace 提示 |
| 索引缓存的生命周期(P3-2):只许删形状正确的文件(含反证)、三条护栏、命中时 touch、 |
| 元数据解析何时发生(P1-3b 的决策门禁):命中不解析不许退化、解析每次 open 只发生一次、逐题量哪些查询会逼出解析器、以及「载入失败不许被降级成『没有基类』」(含把旧写法搬回来的反证) |
| 合并后的工具:参数区分而不是各留一个 |
| Frida 探针能编译、能加载、能 ping |
| 文档与代码的工具清单、脚本清单一致 |
| 全部工具的语义标注:危险工具必须声明 |
| 多游戏矩阵的工具清单对账必须阻断: |
| 静态扫「哪个工具没人写测试」(导航图,会高估) |
| 人工调试前端与调用流水:日志坏路径不许拖累业务(含非空转反证)、前端工具目录与 MCP 协议及 |
| 验收脚本在 GBK 控制台不崩 |
上表与
devtools/verify_*.py的一致性由verify_tool_inventory.py校验, 所以它不会像以前那样悄悄腐坏(本节曾写「10 个脚本」而实际已有 20 多个)。
几个关键的「硬证据」:
静态 token == 运行时 token(50/50、17/17、9/9 全中) → 证明确实挂到了目标方法,而不是同名重载。
PresetLoaderV2.userDataPresetFile运行时偏移 = 0x20, 与地面真值 dump 里的/*0x20*/一致 → 证明字段偏移是真的。运行时映像数 94 == 静态映像数 94 → 证明探针挂到的是同一个游戏实例。
字段类型 27,264 条与 dump 比对 0 错 → 证明
derived那一档没有蒙错。
跑法(一条命令跑全部,自带垫片、开跑前清空旧日志、结束时卡覆盖率门禁):
python devtools\run_all_verify.py只跑一两个排查时用 --only(注意此时会跳过覆盖率门禁,因为子集不可能覆盖全部工具):
python devtools\run_all_verify.py --only verify_lazy_handles改纯函数/解析逻辑时用 --fast(离线快检,不拉起任何游戏,约 3 分钟):
python devtools\run_all_verify.py --fast
--fast跳过的是「真的会调用launch_game/inject_process/spawn_and_attach/ensure_runtime」的脚本,清单由 AST 从源码推导 (不是手写名单 —— 手写清单必然漂移,正是本仓库反复吃亏的地方)。 它同时跳过动态覆盖率门禁(覆盖率要求整套跑完才有意义), 并在结尾如实列出跳过了哪些。--fast全绿 ≠ 全量通过:提交完整改动前请跑不带--fast的那条。
verify_mcp_tools.py会真的启动一个游戏并在结束时结束它。 它需要 Frida 与一个 IL2CPP 样本(如 Garden of Witches)。 不需要管理员权限 —— 实测普通用户权限即可(见下方「权限」一节)。 样本不存在的脚本会记为「无法验证」并跳过 —— 跳过不算通过。
多游戏矩阵:能力边界不靠单一样本推断
单一样本只能证明「在某个游戏上能用」。devtools/ 下有两个跑遍全部样本
的报告脚本(只出报告、不改代码,退出码恒为 0):
python devtools\report_multi_game_matrix.py # 静态:样本 × 工具的候选分类
python devtools\report_runtime_matrix.py # 运行时:真的启动/注入/Hook,逐工具判定report_runtime_matrix.py 会真的启动每个游戏、注入探针、装 Hook、
强制调用并读回参数与返回值,最后按「游戏 × 45 个工具」输出
ok / 不适用 / 失败 三态(--json 落盘 + --md 出报告)。
最近一次全量结果见 docs/多游戏运行时兼容性报告.md。
它对「正确拒绝」与「工具坏了」分得很清:
decompile在 IL2CPP 上返回 「不是 .NET 程序集」、短名有歧义时返回ambiguous+ 候选,都算 不适用 / 正确拒绝,不算失败 —— 否则报告会把设计行为统计成缺陷。
验收套件没全绿?先看失败清单
python devtools\run_all_verify.py 的汇总行只打印失败脚本的名字,
看不出「环境缺样本」还是「代码真坏了」——这两类必须分开处理。
逐项的现象 / 根因 / 修复路径 / 验证方法见
docs/验收失败清单.md。
该文件是滚动更新的:修掉一项就划掉一项。当前快照(2026-10-02)为
通过 33 / 40,7 项失败中 1 项是产品缺陷、2 项是脚本用了 Python 3.12 语法、4 项是缺样本。
设计取舍
为什么不做 MCP 的进度、取消与 tasks
这三样都是协议里有、但这个客户端不消费的东西,量过之后才决定不做:
协议面 | 实测 | 结论 |
| 客户端调工具时只传 | 不做 |
| 客户端确实会传取消信号,但服务器这一侧够不着: | 不做 |
| 同样只有通用 SDK 里有,没有任何客户端包消费 | 不做 |
tasks 扩展( | 客户端桥直接抛错: | 不做(声明 |
订正(旧文案已过时):本表曾写「FastMCP 对同步工具是内联调用、 事件循环被占满,连取消通知都读不到」,并据此说「60 秒的
launch_game期间 服务器什么都干不了」。这两句现在都不成立:server.py的_install_event_loop_guard()早已把经 MCP 分发的同步工具 offload 到线程池 (ToolManager.call_tool→asyncio.to_thread),并实测慢调用在飞时get_session10/10 次秒回(见《重启验证报告-第二轮》§4 与devtools/verify_report_fixes.py)。 「不做取消」的结论不变,但理由换成了上面那条:结构上够不着 ——同步工具体拿不到context,没有取消的承接方。
这三条依据由 devtools/verify_mcp_context.py 钉住:变了就报红,
提醒重读判断,而不是让断言变绿。
为什么引擎解析器全部手写,不用现成库
pefile / lief 更省事,但会带来三个问题:依赖体积、版本漂移、
以及遇到魔改文件时无从下手。自己写 PE 解析不到 400 行,
IL2CPP 元数据解析 1,000 行——换来的是零依赖和完全可控的错误信息。
为什么要有 adapt.py 这一层
IL2CPP 和 Mono 是两个根本不同的元数据体系:
IL2CPP:字段/方法各自的索引轨道相互独立,字段的
typeIndex甚至不在自己的索引空间里,得靠「比它小的最大 byval 键」推算(~90% 可解)。Mono:标准 ECMA-335,类型都编码在
#Blob签名里,能精确解出 完整类型名(数组、泛型、指针都对)。
但两者在「类型/字段/方法的归属关系」上是同构的。把类型引用的
表示差异收进 adapt.py,索引层就能共用一套代码——这也是
verify_adapt.py 存在的意义:证明同一套 API 两边都跑得通。
为什么宁可返回 ok: false 也不猜
工具返回必定带 ok 字段。索引层用 found=False 表示「查了但没有」,
服务器层会把它转成明确的 ok: false + error。
原因很直接:假成功是最危险的一类错误。如果「类不存在」返回
ok: true + 空列表,Agent 会以为类存在但没有字段,然后基于这个
错误结论继续往下走。宁可报错。
同理,IL2CPP v31 的字段记录里没有 flags 槽,所以
field_is_static 返回 None 而不是猜一个 False——
猜出来的 False 会让 Agent 以为它验证过。
索引缓存怎么管(会一直长大的那个目录)
缓存文件名是 <引擎>-<元数据 sha256 前 16 位>.sqlite。这个键选得对
(换游戏、换版本必定重建,不会串数据),但它有个没人管过的副作用:
「玩过多少游戏」+「游戏更新过多少次」,都会永久堆在
~/.gamemod/cache里。实测一个 IL2CPP 游戏的索引 25.7 MB, 而 Mod 开发本来就要反复更新游戏 —— 每次更新换一个新文件, 旧文件再也不可能被命中。
以前这件事在任何工具返回里都看不见(get_diagnostics 只报一个路径字符串)。
现在:
能力 | 在哪 | 说明 |
看得见 |
|
|
有边界 | 打开索引时自动清理 | 上限 2 GiB;最近 4 个、7 天内用过的永不删 |
在用的不会被误删 | 命中缓存时刷新 mtime | 否则天天在用的缓存会被当成「最久没用」先删掉 |
删了什么要说 |
| 真删了才有这个字段;没删就不给(不给恒定噪声) |
清理有三条护栏,而且只删文件名形状正确的(<引擎>-<16 位十六进制>.sqlite):
缓存目录里可能有你自己的东西,删文件不可逆,所以宁可漏删不可错删。
按上面的边界,5 个游戏的 ~130 MB 永远不会被碰。
想立刻腾空间就直接删 ~/.gamemod/cache 里的东西 —— 它只是可重建的派生数据,
代价是下次打开那个游戏重新解析(IL2CPP 约 2.6 秒,巨型样本约 12 秒)。
这条策略的验收在 devtools/verify_cache.py(含「把正则放宽就会误删」的反证)。
那「第一次查询」为什么还要等 400 毫秒
缓存命中确实不解析元数据(IL2CPP 528 → 19.6 ms),但紧接着的第一次查询
会把它逼出来:索引里存的是「有哪些类型」,而基类名、字段类型、方法返回类型
这些可读名字是查询时由解析器算的。实测 8 个查询里 7 个会逼出来
(只有 index_info 不用),IL2CPP 约 440 ms,在 5 查询的一次会话里占 65~78%。
把这些名字也存进 SQLite(路线图里的 P1-3b)能省掉这 440 ms。 已经量过,结论是不做,理由三条:
半量修复等于零。
search_classes需要解析器只因parent一个字段, 但「只存parent_name」省不下任何东西 —— 紧接着的class_detail仍要解析。 解析是全有或全无,所以「parent_name/field_type入库」这种按列拆的 写法本身就误导:这两列不能分别计价。完整修复要动分层。要让 7 个查询都不解析,得把
class_detail/class_hierarchy/analyze_dependency等 10 个查询层函数改成完全由 SQLite 驱动 —— 那等于在索引层再实现一遍继承语义,而 AGENTS.md §3 要求引擎差异只出现在adapt.py。两份继承语义互相漂移,正是本项目反复 吃亏的那类错误。省下的是「每次
open_game一次」的 440 ms,不是每题 440 ms。
理由与数字钉在 devtools/verify_lazy_meta.py(既是回归门禁,也是这个决策的
门禁):哪天那张「哪些查询需要解析器」的表空了,它会提醒回来订正结论。
顺带,这个脚本还捞到并钉住了一个真缺陷:元数据载入失败曾被
except Exception 降级成「这些类没有基类」(ok: true + 200 行 parent: null)。
现在载入失败会如实报 ok: false + 原因,验收就是那段「把旧写法搬回来」的反证。
已知限制
IL2CPP 字段类型约 10% 解不出。这是元数据格式本身的限制 (复合类型只给到元素类型),不是 bug。工具会标记
type_confidence: unknown,需要时用运行时内存读取确认。反调试游戏注入会失败。带 EAC/BattlEye 的网游基本注入不了, 这是预期的,不要反复重试。
Unreal 支持受限。UE 没有像 IL2CPP 那样集中的元数据文件, 结构信息依赖 UE profile /
.usmap。能力以get_diagnostics()报告为准。Windows 注入不需要管理员权限(实测订正)。 只要 Agent 与游戏的完整性级别相同即可 —— 普通权限的 python 注入普通权限的 IL2CPP 游戏实测成功。唯一的例外是 游戏以管理员身份运行(完整性级别
High),此时才需要同样提权; 反之游戏是普通权限、Agent 是管理员,通常也能注入。这条曾经写错成「通常需要管理员权限」,来源是失败提示里的一句 猜测性归因。实测证据:本进程与游戏进程的完整性级别都是
Medium,attach→runtime_info→find_instances全部成功。Headless 环境验证不到自然调用。没有显示/GPU 的机器上游戏不渲染帧, 每帧方法不会自己触发。Hook 有效性通过从注入侧主动调用来证明。
环境要求
Windows(本项目只支持 Windows)
Python ≥ 3.10(实测 3.13.1)
mcp ≥ 1.0, < 2、frida ≥ 16(实测 frida 17.17.0)
⚠️
mcp必须 < 2:本代码用 1.x 的mcp.server.fastmcp.FastMCP, 2.x 已改名成MCPServer(mcp.server.mcpserver)。只写>=1.0.0会让全新环境装到 2.x 然后服务器起不来 —— 这是打包分享包时实测到的。
可选弱视觉(截图 / OCR):
dxcam|mss+rapidocr-onnxruntime|pytesseract
numpy/opencv-python/pillow/pywin32。不装不影响其它工具,get_diagnostics()的screen段会如实报告可用性。
分享包(给别人测试用)
一条命令生成一个自带依赖、开箱即用的分享包:
python devtools\build_share.py # 打包(会下载 wheel)
python devtools\build_share.py --no-wheels # 只打源码(体积小)
python devtools\build_share.py --check # 只校验已有分享包产物落在仓库同级 ..\GameModMCP-share\(不进 git),并自动打 zip。
形态:
GameModMCP-share/
├── 安装说明.md ← 给 AI 读的入口(**整个目录直接交给对方的 Agent**)
├── install.py ← 一键安装(主推)
├── src/ skills/ mcp-config/ devtools/ docs/
└── wheels/required|optional ← 依赖 wheel(离线可装,必需约 63 MB)打包后自检 44 项,其中最关键的一条是用包内源码真起一次服务器
数工具数 —— 它能抓到「拷漏了文件」「依赖装错版本」这类只有对方才会踩到的
问题(实测就是靠它发现 mcp>=1.0.0 会装到 2.x 导致起不来)。
另有 6 项专门盯许可:LICENSE 在不在、是不是完整的 MIT 文本、有没有版权行,
以及 README 与 pyproject.toml 是否和它说同一件事 —— 因为分享包会分发
src/,而 COPY_FILES 里文件名写错时是静默跳过的,包照样打得出来、
照样能装,只是没有许可。
为什么入口是 Python 而不是 .ps1:Windows 自带的 PowerShell 5.1 读无 BOM 的 UTF-8 中文脚本会按 GBK 解码、直接语法报错,而
pwsh对方不一定装了。对方装了 Python 才能跑 MCP,所以 Python 一定在。
许可
MIT © 2026 liwenhao0427
可自由使用、修改、再分发(含商用),只需保留版权与许可声明。
完整授权文本见 LICENSE —— 它与 pyproject.toml 的
license 字段是同一份许可,改动时必须同步。
为什么之前只有这一行字、没有文件:README 与
pyproject.toml都声明了 MIT,但根目录一直没有LICENSE,GitHub 因此把本仓库识别成license: null—— 「声明了许可却没有授权文本」。分享包会分发src/,所以许可文本必须 随源码一起走(见devtools/build_share.py的COPY_FILES)。
Available Tools
45 toolsanalyze_dependencyARead-onlyIdempotent
分析一个类型引用了哪些其它类型(字段/父类/方法返回类型)。近似,非精确调用图。
referenced_count 是真实总数(不受 limit 影响);
referenced_types 最多 100 条并带 referenced_has_more。
用来判断「改这个类会不会牵连很多地方」。
同类名跨程序集时会拒绝并给出候选(与 class_detail 同一规则)。
Args: full_name: 类完整名。 assembly: 同名类消歧用(子串匹配,如 "TeamTapas")。
| Name | Required | Description | Default |
|---|---|---|---|
| assembly | No | ||
| full_name | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Beyond the readOnly/idempotent annotations, the description discloses real behavioral traits: it is an approximate graph, referenced_count is the true total independent of limit, referenced_types caps at 100 with a referenced_has_more flag, and ambiguous same-name classes are rejected with disambiguation candidates.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded purpose, then caveats, then usage rationale, then Args — a logical order with little waste. The bold emphasis and backticks add mild formatting noise but not enough to detract materially.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
There is no output schema, and the description compensates by describing the shape of the result (referenced_count, referenced_types with has_more). Combined with the read-only annotations and two clearly documented params, an agent has everything needed to call it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage the description must carry parameter meaning, and it does: full_name is the fully qualified class name, and assembly disambiguates same-named classes via substring match with a concrete example ('TeamTapas'). Minor gap that full_name itself needs little elaboration.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The opening sentence states a specific verb+resource and even defines what 'references' covers (fields/parent class/method return types), so an agent knows exactly what is being computed. The caveat that it is an approximate dependency view, not an exact call graph, further sharpens the purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It supplies a clear use case — judging whether changing a class will ripple to many places — and notes that cross-assembly name collisions are rejected with candidates following the same rule as class_detail. It does not explicitly compare against class_hierarchy or find_derived_classes, so it falls short of a full when/when-not decision.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
capture_screenAIdempotent
截屏 / 截窗口存盘并返回路径(不回 base64)。截图是证据、不是判据;窗口找不到会如实失败,不静默改截整屏。
⚠️ 截图不是判据,只是证据。要判断「现在在哪个界面」请用 ocr。
这条规矩来自同类项目的教训(podium-mcp 源码原文:
"Screenshots are NEVER an oracle.")—— 让模型看像素去下结论,
既贵(单张截图约 5 万 token)又不可靠。
不返回 base64:本项目任何返回都不超过 256 KB,而一张 2560x1440 的 PNG base64 会直接把它撑爆。图落在磁盘上,返回路径。
典型用途:验收失败时留证据(配合 ocr 的 save_on_failure)。
Args: region: "x,y,w,h" 屏幕绝对坐标;不传则截整个主屏。 window: 窗口标题子串;给了就用该窗口的矩形(优先于 region)。 找不到会如实失败,不会静默退化成截整屏。 save_path: 保存路径;不传则落临时目录(返回里给路径)。 max_side: 证据图最长边上限(等比缩小,默认 1920);0 = 不缩放。 只影响存盘的证据图,不影响坐标语义。
Returns: {ok, path, width, height, backend, region, coordinate_space, ...}
| Name | Required | Description | Default |
|---|---|---|---|
| region | No | ||
| window | No | ||
| max_side | No | ||
| save_path | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=false, idempotentHint=true, destructiveHint=false and openWorldHint=true. The description adds genuinely useful behavior: window lookup fails honestly rather than silently falling back to full screen, output goes to disk to stay under the 256 KB response cap, and max_side never alters coordinate semantics. That is real added context beyond the annotations, so it earns above baseline.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
It is front-loaded with the core contract and the ocr routing rule, and the Args/Returns blocks are scannable. It loses a point for redundancy: the 'screenshots are evidence, not an oracle' rule is stated twice, once in the lead and again in a full warning block with a quoted source, which is more philosophical justification than an agent needs.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the Returns block supplies the response shape ({ok, path, width, height, backend, region, coordinate_space, ...}), and defaults plus failure behavior are covered for every parameter. Nothing an agent needs in order to call this correctly is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description carries the full burden and does so for all four parameters: region as 'x,y,w,h' absolute screen coordinates defaulting to the main screen, window as a title substring that takes priority over region, save_path defaulting to a temp dir, and max_side defaulting to 1920 with 0 meaning no scaling. It even clarifies that max_side affects only the saved file, not coordinates.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The opening line states a concrete verb and resource in both modes (screen / window), plus the defining output contract: saved to disk with a returned path, not base64. It also draws a sharp boundary against the sibling `ocr`, so an agent can pick between them without reading either schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly says when NOT to use it ('要判断「现在在哪个界面」请用 `ocr`') and names the concrete scenario where it belongs (capturing evidence when acceptance fails, paired with `ocr`'s save_on_failure). Both the alternative and the selection condition are stated outright.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
class_detailARead-onlyIdempotent
查看一个类的完整信息:字段(含类型)、方法(含 token)、继承链;给 method_name 可只看某方法的重载。
这是定位 Hook 落点的核心工具:方法的 token 由这里给出, 再配合 runtime_class_info / find_hook_target 就能拿到真实的运行时地址。
重要:静态元数据里没有字段偏移、也没有方法地址(只有 token)。 字段偏移与方法真实地址必须靠注入后的运行时工具取。
同类名跨程序集时会拒绝并列出候选(ok:false + candidates),
请改用完整名或补 assembly= —— 因为返回的是「这个类的全部字段表」,
选错类不是少几条数据,而是整份结果都是别的类的。
查嵌套类型时,full_name 传 search_classes 给的 nested_name
(如 Outer.Inner):嵌套类型的 full_name 只是短名,多个类会撞名,
本工具会因歧义而拒绝(这不是故障,是防止你拿到另一个类的字段表)。
Args: full_name: 类的完整名(如 "PresetLoaderV2"、 "TeamTapas.ProjectR.UserDatas.Service.UserData_Service", 或嵌套类型的 "Outer.Inner")。 include_inherited: 是否包含继承来的字段/方法。 method_name: 只关心某个方法时填这里。填了就只返回该方法的 全部重载(含 token / 参数表 / 是否静态), 等价于旧的 get_method_source,省一轮往返。 assembly: 同名类消歧用(子串匹配,如 "TeamTapas")。留空则 名字必须唯一,否则报错并给出候选。
Returns:
{ok, full_name, nested_name, namespace, image, token, ..., fields,
methods, parent, base_chain, derived_count, derived, derived_returned,
derived_has_more}
derived_count 是派生类总数(真值);derived 只是前 50 个名字,
被截断时 derived_has_more 为 True —— 需要完整列表请用
find_derived_classes。
| Name | Required | Description | Default |
|---|---|---|---|
| assembly | No | ||
| full_name | Yes | ||
| method_name | No | ||
| include_inherited | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare it read-only, idempotent, and non-destructive. Beyond that, the description discloses key behavior: ambiguous class names are rejected with ok:false and candidates, nested-type full names are short and can collide, and derived results are capped at 50 with derived_has_more signaling truncation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Purpose and key constraints are front-loaded, and the Args/Returns sections are useful because the schema lacks descriptions and there is no output schema. It is slightly verbose with repeated emphasis (ambiguity handling for assembly and nested types stated in two separate blocks), but the length is largely justified.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with no output schema and zero schema description coverage, the description is complete: it documents all four parameters, the return shape including derived_count vs. derived truncation, ambiguity failure behavior, and the boundary between static metadata and runtime tools. An agent has what it needs to call it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must carry parameter meaning, and it does: full_name examples include nested types, assembly is a substring match for disambiguation, method_name returns all overloads with token/parameter/static info, and include_inherited controls inherited fields and methods.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource: view a class's full details — fields with types, methods with tokens, inheritance chain — and narrows scope when method_name is supplied. It also explicitly positions itself against sibling tools (runtime_class_info / find_hook_target for runtime work, find_derived_classes for full derived lists), so an agent can distinguish it without opening schemas.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives explicit when-to-use (locating Hook targets via method tokens) and when-not-to-use (static metadata has no field offsets or method addresses; use post-injection runtime tools for those). It names the alternatives and the conditions that select them, including search_classes for nested_name and find_derived_classes when the derived list is truncated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
class_hierarchyARead-onlyIdempotent
查看类的继承体系(向上找基类、向下找派生类)。direction="down" 是逐层的:depth 是所在层、parent 是真实直接父类;单层超 500 条时 down_has_more=true。
同类名跨程序集时会拒绝并给出候选(与 class_detail 同一规则)。
(早期版本把传递式后代当成直接子类,depth/parent 是错的 —— 现在两者用途已分开,
想一次捞全所有脚本请用 find_derived_classes。)
Args: full_name: 类完整名。 direction: up / down / both。 depth: 向下递归深度。 assembly: 同名类消歧用(子串匹配,如 "TeamTapas")。
| Name | Required | Description | Default |
|---|---|---|---|
| depth | No | ||
| assembly | No | ||
| direction | No | both | |
| full_name | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover read-only/idempotent/closed-world safety, and the description still adds real behavioral traits: down is level-by-level with depth and parent meaning level and true direct parent, a single layer exceeding 500 entries sets down_has_more=true, and cross-assembly name collisions are rejected with candidates offered. It also flags the corrected legacy bug so an agent does not misread depth/parent — exactly the kind of context structured fields cannot carry.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Purpose is front-loaded in the first clause, followed by semantics, then caveats, then Args — a sensible order with no filler. The parenthetical note about the earlier buggy version is useful but sits awkwardly next to the find_derived_classes pointer, slightly muddling the routing message.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 4-parameter, read-only tool with no output schema, the definition covers purpose, directional semantics, truncation behavior, disambiguation failure mode, and the alternative tool. It does not state what the result looks like beyond down_has_more/parent, nor what happens for a nonexistent full_name, which are the main remaining holes.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description must carry the load, and the Args section defines all four parameters including the up/down/both values for direction and substring matching for assembly. Gaps remain: the depth default of 6 and any bounds are unstated, and no accepted values are shown for direction beyond the bare list.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource (查看类的继承体系) and immediately scopes it to upward base-class lookup and downward derived-class lookup. It names the sibling it is not (find_derived_classes for grabbing all transitive descendants at once) and ties itself to class_detail's disambiguation rule, so an agent can place it precisely among 40+ siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It routes the agent explicitly: use find_derived_classes to fetch all transitive descendants in one shot, and use assembly to resolve same-named classes across assemblies. What is missing is a positive statement of the primary use case (e.g. 'use this to understand the local inheritance shape of one class') and any when-not-to-use condition beyond the transitive bulk case.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
close_sessionAIdempotent
关闭当前会话:卸载所有 Hook、断开注入、关闭索引。只有真的恢复原状才 ok=true。
任一步失败会 ok=false + error,并保留会话以便重试 —— 这是有意的:
本工具的语义是「游戏已恢复原状」,一个假成功会让你带着仍被篡改的游戏收工。
做完了就调用它,把游戏恢复原状(卸载 Hook 后游戏行为回到未修改状态)。
只有真的恢复成功才返回 ok: True。 卸载 Hook / 卸载脚本 / detach
任何一步失败都会 ok: False + error,并保留会话以便重试 ——
这是有意为之:本工具的语义是「游戏已恢复原状」,
一个假成功会让 Agent 带着仍被篡改的游戏进程收工。
| Name | Required | Description | Default |
|---|---|---|---|
| close_index | No | ||
| close_runtime | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Goes well beyond the annotations by disclosing the critical failure contract: any failed step yields `ok=false` plus `error`, the session is deliberately preserved for retry, and a false success would leave the agent with a still-tampered process. This is exactly the kind of intent-vs-result detail annotations cannot express, and it is consistent with destructiveHint=false / idempotentHint=true (teardown restores rather than destroys, and retry is safe).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The core action is front-loaded in sentence one, but the same guarantee is restated three times ('只有真的恢复原状才 ok=true', '任一步失败会 ok=false + error 并保留会话以便重试', and again in the trailing paragraph). The duplication roughly doubles the length without adding information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a session-teardown tool with no output schema, the description supplies what matters most: the meaning of the `ok`/`error` result and the retry-preserving behavior. The remaining gap is the two boolean teardown flags, which are left unexplained for a 2-parameter tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the schema only gives titles and defaults. The description's '关闭索引' loosely maps to `close_index` and '卸载所有 Hook / 断开注入' to `close_runtime`, but it never explains what happens when either flag is false, nor when to override the defaults. Partial compensation only.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The opening states a specific verb and resource ('关闭当前会话') and enumerates exactly what teardown means: unload all hooks, detach injection, close the index. That enumeration implicitly separates it from narrower siblings like `unhook` or `hook_status`, though no sibling is named. An agent can tell what this does without opening the schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
'做完了就调用它,把游戏恢复原状' gives a clear trigger condition (work is finished, restore original state). There are no explicit exclusions or named alternatives such as `unhook` for partial teardown, so it stops short of a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
decompileAIdempotent
反编译 Mono/.NET 程序集,拿到真正的 C# 源码(薄封装 ilspycmd)。
给 type_name 反编译单个类型(小结果内联在 source);给 output_dir
反编译整个程序集(只落盘 + 返回文件清单,不内联源码)。
嵌套类型会退让到最外层并写 nested_note,decompiled_type 如实报
实际产出的类型名。只支持 Mono,IL2CPP 会明确报错。
依赖是可选的,见 get_diagnostics 的 decompiler.available。
为什么需要它:静态元数据只能给出「有哪些类/字段/方法、签名如何」, 但给不出方法体逻辑。想知道「这个方法到底怎么算伤害的」, 就要反编译看源码 —— 这是元数据索引与运行时 Hook 都替代不了的一环。
只支持 Mono/.NET。IL2CPP 的 GameAssembly.dll 里没有托管元数据, 传进来会明确报错(IL2CPP 的 C# 反编译需要先造 DummyDll,本项目暂未实现)。
两种粒度,用参数区分(故意只做一个工具,避免让你猜该用哪个):
· 反编译**一个类型**:给 type_name(可选 output_dir)
源码小于 20 万字符时直接内联在 `source` 里返回。
· 反编译**整个程序集**:只给 output_dir
产物可能上万文件,因此只落盘 + 返回文件清单统计,**不内联源码**。Args:
assembly: 程序集路径(.dll / .exe)。Mono 游戏通常是
<游戏目录>/<游戏名>_Data/Managed/Assembly-CSharp.dll。
留空则用当前会话识别出的那个(Mono 游戏可直接用)。
type_name: 类型名,支持 Namespace.Type。传空表示反编译整个程序集。
嵌套类型可传 Outer.Inner 或 Outer+Inner:
由于 ilspycmd 无法单独定位嵌套类型(产物始终是最外层那一份),
会自动退让到最外层类型,并在 nested_note 里说明。
decompiled_type 报的是实际产出的类型名(即最外层),
不是请求名 —— 这样调用方不会把外层源码误当成内层源码。
declared_types 已核对,内层类型的声明确实在这份产物里。
output_dir: 输出目录。给了就落盘(整程序集模式必填)。
split_files: 整程序集模式下是否一个类型一个文件(默认 True)。
True 出 800+ 个小文件(实测 3.5 秒),便于按需读取;
False 出单个大文件(实测 11.5 秒),便于整体搜索。
| Name | Required | Description | Default |
|---|---|---|---|
| assembly | No | ||
| type_name | No | ||
| output_dir | No | ||
| split_files | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Beyond the annotations (readOnlyHint=false, idempotent=true, destructive=false), it explains the disk-write behavior that justifies the mutation hint, the 200k-char inline threshold, the nested-type degradation plus nested_note and decompiled_type semantics, and the IL2CPP error path. Timings (3.5s vs 11.5s) further disclose the cost profile.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Well front-loaded with headers and an Args section, and nearly every line earns its place. The Mono-only / IL2CPP point is restated in two places, which is mild redundancy that could be trimmed.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite no output schema, the description explains the return shape (inline source, file listing without inline source, nested_note, decompiled_type) and the error behavior, which is everything an agent needs to call it correctly given its complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description carries full burden, and it documents all four parameters: assembly defaults to session-detected with an example path, type_name accepts Namespace.Type and Outer.Inner/Outer+Inner with the fallback rule, output_dir is required for whole-assembly mode, and split_files explains its default and the file-count/time trade-off. This fully compensates for the empty schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb+resource (反编译 Mono/.NET 程序集, get real C# source) and immediately names the underlying implementation (薄封装 ilspycmd). It also clearly separates its purpose from the metadata tools (class_detail, search_methods) and runtime hooks, so an agent can pick it without opening the schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly gives the two usage modes (type_name → inline source; output_dir → whole-assembly, disk only), explains the 'why' (metadata cannot expose method body logic), states the Mono-only / IL2CPP-errors constraint, and points to get_diagnostics' decompiler.available for the optional dependency. It names the alternatives that cannot replace it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
detect_ueARead-onlyIdempotent
判断一个 exe 是否为 Unreal 引擎游戏,并给出可核查的证据与置信度。
只判定这一个程序,不做全机扫描。
UE 版本号拿不到是正常的:实测两个样本中 exe 内 UE 版本模式 0 命中, Engine/Build/Build.version 也不存在。此时返回空串 + 原因,不猜测。
Args: exe: 游戏可执行文件路径。留空则用当前会话的主程序。
| Name | Required | Description | Default |
|---|---|---|---|
| exe | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already mark it read-only, idempotent and non-destructive, so the description does not need to repeat that. Instead it discloses behavior beyond the annotations: how results come back (evidence + confidence), and that a UE version is frequently unavailable and yields an empty string plus a reason rather than a guess, which prevents an agent from misreading a missing version as failure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the primary purpose, then scope, then the caveat about missing version info, then Args. It is short and every block adds value; the empirical note about two samples justifies the no-guessing rule rather than padding.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description does explain the return shape (evidence, confidence, and empty string + reason when the version is absent). Given annotations covering the safety profile and only one optional parameter, what remains is minor; the set of evidence types the agent can expect is only sketched.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description must carry the parameter meaning, and it does: exe is the game executable path, and leaving it empty falls back to the current session's main program. That default behavior is not visible in the schema, which only shows default ''.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The first sentence states a specific task: decide whether one exe is an Unreal Engine game, and return verifiable evidence plus a confidence level. The scope line ('only judges this one program, no whole-machine scan') separates it from scan-style siblings such as find_game_processes, though it does not name a sibling directly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description says it handles a single program rather than a machine-wide scan, which implies when to use it. However, it never names the alternative (find_game_processes / inspect_binary / inspect_game) or states an explicit condition for choosing this tool over them.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
drain_eventsA
取走探针缓冲的 Hook 事件(调用记录)。kind 过滤作用于整条队列(不是只看队首)。
不匹配的事件会原序留在队列里,不会被吞;超出 limit 的匹配事件同样留下。
语义与 AiMod 的 /v1/events?after= 一致:取走即消费。 想持续观察就每隔一会儿调用一次,累加统计即可。
kind 过滤的是整条队列,不是只看队首那一条 —— 注入后队首恒有一条
notice(probe_ready),若只在队首判断,kind="hook" 会一条都取不到
(返回 ok:true + 空列表,调用方会误判成「Hook 没触发」而去排查落点)。
不匹配的事件按原序留在队列里,不会被吞;超出 limit 的匹配事件同样留下。
Args: limit: 本次最多取多少条。 kind: 只取某类事件(如 "hook" / "notice" / "log")。
Returns: {ok, returned, pending_approx, dropped, events: [...]} 事件形如 {type, id, label, phase: enter/leave, seq, thread, from, args, retval}
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | ||
| limit | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses the key trait the annotations only hint at: 取走即消费 (drain-and-consume), matching idempotentHint=false, plus that non-matching and over-limit events are preserved in order and never swallowed. This is exactly the behavioral nuance an agent needs before calling a consuming operation, and it is consistent with readOnlyHint=false / destructiveHint=false.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with the core consume semantics, but the text repeats itself almost verbatim: the whole-queue filtering point appears three times and the '不匹配的事件留在队列里,不会被吞' sentence twice. Roughly a third of the description is redundant restatement.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
There is no output schema, and the description supplies the return shape ({ok, returned, pending_approx, dropped, events:[...]}) plus the event field layout. Combined with the consumption semantics and the kind-filter pitfall, an agent has everything needed to call and interpret it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description must carry the burden — and it does: limit is '本次最多取多少条', kind is '只取某类事件' with example values (hook / notice / log). It additionally explains that kind filters the whole queue rather than the head, which is meaning the schema cannot convey. Defaults (200, "") are left to the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource: 取走 (drain) the probe's buffered Hook events, with parenthetical clarification that these are call records. It is clearly distinguishable from read-only log readers, though it never names the sibling probe_log explicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives concrete usage context: '想持续观察就每隔一会儿调用一次,累加统计即可' tells the agent to poll periodically and accumulate stats. It also warns which failure mode (empty list from queue-head-only filtering) leads callers astray. It lacks an explicit 'use X instead when…' comparison against probe_log.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
eval_scriptADestructive
在游戏进程内执行任意 Frida JS 代码 —— 应急逃生舱。
与 AiMod 的 eval_script 同定位:当预置工具不够用时, 直接下发 JS 探测。
可用全局对象:mod / api / funcs / hooks(IL2CPP 侧),
以及 monoFuncs 与 BE(Mono 侧的已绑定导出、以及当前选中的后端对象)。
后者是排查 Mono 问题的必需品:例如
"typeof monoFuncs.mono_field_get_offset" 能直接看出某个导出有没有绑上,
不必去复刻绑定逻辑。
返回值必须是可 JSON 序列化的(字符串/数字/布尔/数组/普通对象)。
示例: "Process.arch" "mod.base.add(0x1000).toString()" "(function(){ return Process.enumerateModules().length; })()" "typeof monoFuncs.mono_get_root_domain"
Args: code: JS 表达式或语句块。
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already flag destructiveHint=true, openWorldHint=true, readOnlyHint=false and idempotentHint=false, so the safety bar is lower; the description still adds genuine substance by documenting the available globals (mod/api/funcs/hooks, monoFuncs/BE) and the hard constraint that return values must be JSON-serializable. It does not say what happens on a thrown exception or a crashed process, which for an arbitrary-code tool is a notable omission.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The critical framing ('escape hatch', 'when preset tools are not enough') is front-loaded, then globals, then return contract, then examples — a sensible dependency order. It is on the long side and the monoFuncs explanation is slightly instructional rather than definitional, but every block is usable information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema exists, so the description correctly steps in to define the return contract as JSON-serializable values. Combined with the annotations and the examples, an agent has enough to invoke it competently; only failure-mode and side-effect disclosure is thin for a tool that runs arbitrary code in a live process.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% for the single `code` parameter, so the description must carry the load — and it does, defining it as a JS expression or statement block and supplying four concrete examples spanning a plain expression, an address chain, an IIFE and a `typeof` probe. What it lacks is any statement about error/exception surfacing or size limits on the payload.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb + resource (execute arbitrary Frida JS inside the game process) and immediately frames its niche with '应急逃生舱' (escape hatch of last resort) and '与 AiMod 的 eval_script 同定位'. An agent can distinguish it from the 40+ targeted siblings like hook_method or read_memory without opening the schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
'当预置工具不够用时,直接下发 JS 探测' gives explicit triggering context, and naming the preset tools collectively as the alternative routes the agent correctly. It falls short of a full 5 because it never says when NOT to use it (e.g. prefer the dedicated tool for a known operation) nor warns about how easily the escape hatch can destabilize the session.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
find_derived_classesARead-onlyIdempotent
找出所有继承自某个基类的类型(含间接继承);配 assembly= 可筛出游戏自己的 MonoBehaviour 脚本(找脚本的必备工具)。
total 是匹配总数,被 limit 截断时 has_more=true。
两个最常见的用法:
· 找游戏自己写的 MonoBehaviour 脚本(Mod 最常 Hook 的目标):
find_derived_classes(base_full_name="UnityEngine.MonoBehaviour", assembly="Assembly-CSharp")
传 assembly 比按程序集名前缀猜「哪些是引擎自带的」可靠。
· 找所有 UI 面板 / 数据服务:把 base_full_name 换成对应基类即可。
基类不必在当前索引的程序集里(如 UnityEngine.MonoBehaviour 属于框架程序集),这种情况结果依然有效,并在 note 里如实说明。
total 是匹配总数,不受 limit 影响;returned 才是本次返回条数。
若 has_more 为 True,说明被 limit 截断了,还有结果没返回。
Args:
base_full_name: 基类完整名,如 "UnityEngine.MonoBehaviour"。
assembly: 只看该程序集(子串匹配,如 "TeamTapas")。留空不限。
limit: 最多返回多少条(total 仍是匹配总数)。
Returns: {ok, found, base, total, returned, has_more, items: [{index, full_name, image, field_count, method_count}]}
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| assembly | No | ||
| base_full_name | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover readOnly/idempotent/non-destructive/closed-world, and the description adds genuine behavior: base classes outside the index still yield valid results with an explanatory note, plus total vs returned vs has_more truncation semantics. However it repeats that total is unaffected by limit twice, so added value is diluted.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loading is good, but the total/limit/has_more rule is stated three times across the body, and the Args/Returns blocks restate material already given in prose. Tightening to one statement of the pagination rule would lose nothing.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
There is no output schema, but the Returns block enumerates every field including item shape, and edge cases (base outside the index, truncation) are covered. An agent has everything needed to call it and interpret the result.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, and the description fully compensates: base_full_name needs the fully-qualified name with an example, assembly is substring-matched (a detail absent from the schema), and limit caps only returned rows while total stays the full match count.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource: find all types deriving from a base class, explicitly including indirect inheritance, with an optional assembly filter. Clear enough to separate from search_classes, but it never names the nearest alternative (class_hierarchy) so the distinction must be inferred.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives two concrete when-to-use recipes with literal call examples, including the primary Mod use case (MonoBehaviour in Assembly-CSharp). It also explains why passing assembly beats guessing from assembly-name prefixes, which is real decision guidance rather than restating the name.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
find_game_processesARead-onlyIdempotent
列出正在运行的游戏进程,并识别其运行时(il2cpp / mono / 其它)。
Args: name_filter: 进程名子串过滤(大小写不敏感)。 only_games: 只要看起来像游戏的进程(默认 True)。
Returns:
{ok, count, processes: [{pid, name, exe_path, window_title,
runtime, is_64}]}
is_64 为 None 表示没测出来(拿不到进程句柄),不是「32 位」。
| Name | Required | Description | Default |
|---|---|---|---|
| only_games | No | ||
| name_filter | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly/idempotent/openWorld/non-destructive, so the safety profile is covered. The description adds genuine behavioral context beyond that: the full return shape, the case-insensitive substring filter, and the important caveat that `is_64=None` means 'not measured' rather than '32-bit', which prevents a real misinterpretation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The purpose sentence is front-loaded, Args and Returns are cleanly separated, and every line adds information. No filler or duplicated schema boilerplate.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description supplies the return structure and per-field caveats, and it documents both parameters. What's missing is only a brief note on how the game heuristic behaves or how large the result set might be.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must carry the load, and it does: it explains `name_filter` as a case-insensitive process-name substring and `only_games` as a heuristic game-process filter defaulting to True. It stops short of defining what 'looks like a game' means, which keeps it from a 5.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource ('列出正在运行的游戏进程') plus a secondary capability (identify the il2cpp/mono runtime), which is far more than a restatement of the name. It doesn't explicitly contrast itself with siblings like runtime_info or inspect_game, so it's clear but not sibling-differentiating.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is only implied: the `only_games=True` default hints that discovery comes first and filtering is secondary, and one can infer this is a pre-step to opening/inspecting a process. There is no explicit when-to-use, when-not-to-use, or named alternative.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
find_hook_targetARead-onlyIdempotent
定位某个方法可 Hook 的地址(含 RVA 与 token)。同样支持完整嵌套名,歧义时拒绝。
这是「从静态元数据到 Hook 落点」的关键一步: 先用 search_classes/class_detail 从元数据确认目标方法(拿到 token), 再用本工具在运行时把类实体化,拿到真实地址; 最后用返回的 token 与静态 token 比对,确认挂的是同一个方法。
返回的每个 candidate 里 address 可直接喂给 hook_address;
rva_hex 可与静态元数据的 RVA 对照,token 用于确认是同一个重载。
Args:
name: 类名(短名即可;嵌套类型传完整嵌套名)。
method: 方法名(重载时看 candidates 的 param_count 区分)。
namespace: 命名空间(可选)。不给时按短名在顶层类型里解析,
唯一才采用,多个则返回 ambiguous: true + candidates。
image: 程序集名。
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| image | No | ||
| method | Yes | ||
| namespace | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The annotations already declare this is a read-only, idempotent, open-world, non-destructive lookup, so the safety profile is covered. The description still adds real context beyond that: it discloses that the class is materialized at runtime (a side effect beyond pure metadata reads) and defines the ambiguity outcome with its payload. It does not discuss cost, failures, or whether materialization affects game state, which keeps it at 4 rather than 5.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The opening sentence front-loads the core purpose, and the workflow block is genuinely load-bearing for correct invocation. It is longer than strictly necessary — the closing per-field notes on address/rva_hex/token partly repeat the workflow paragraph — but no sentence is wasted.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
There is no output schema, so the description must explain return values, and it does: candidates containing address (feedable to hook_address), rva_hex (comparable to static RVA), token (confirms the same overload), plus the ambiguous flag. Combined with the documented params and annotations, an agent has everything needed to call and interpret it.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description carries the full burden, and it does: name accepts a short name but nested types need the full nested name; method overloads are disambiguated via param_count on candidates; namespace is optional, and when omitted resolution is restricted to top-level types and only adopted if unique, otherwise ambiguous. That is meaning well beyond the bare typed properties.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: locate the hookable address (with RVA and token) of a method. It distinguishes itself from the sibling tools it names explicitly (search_classes/class_detail for static lookup, hook_address for consuming the result), so an agent can place it in the pipeline without opening the schemas.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives an explicit three-step workflow: first confirm the target method in static metadata with search_classes/class_detail and capture its token, then call this tool to materialize the class at runtime, then compare the returned token with the static token. It also states the failure behavior when the name is ambiguous (returns ambiguous: true plus candidates), which is exactly the when-not case an agent needs.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
find_instancesARead-onlyIdempotent
枚举类的活对象实例(拿 instance 指针的正路 —— 此前只能靠 Hook 碰运气)。走 GC liveness;IL2CPP 可用(实测毫秒级)、Mono 受官方限制会如实报 unsupported(不用空列表冒充「没有实例」),值类型无堆实例则明确报错。
为什么需要它:read_field_value / set_field_value / hook_method
都要一个对象指针,而在此之前唯一的办法是「Hook 一个恰好会收到
该对象的函数,从 args[0] 里捡」—— 那是碰运气。本工具直接问运行时
「这个类现在有哪些实例」。
实现走 GC liveness(Unity 自家内存分析器用的那套导出)。
注意:il2cpp_class_get_instances 这种「按类直接列实例」的导出
并不存在(5 个真实样本实测),别照着那个名字找。
引擎差异(都是如实声明,不是缺陷):
引擎 | 情况 |
IL2CPP | ✅ 可用,实测毫秒级(GameObject/Transform/String 各约 10ms) |
Mono | ⚠️ 官方头文件写明堆遍历「只在 pre-stop-world 回调内有效」,从外部线程调用不保证可用。拿不到时本工具返回 |
两个明确的限制:
值类型(struct)没有堆实例,会直接报错说明,而不是返回空列表。
实例数超过
max_count时截断,overflow:true表示「还有更多」。
⚠️ 返回的实例包含派生类(这是最容易踩的坑):
find_instances(name="Transform", namespace="UnityEngine") 拿回来的
实测全是 RectTransform —— 因为 Unity 里 UI 节点都是 RectTransform,
而它们是 Transform 的派生类。这不是缺陷(liveness 语义如此),
但用基类的字段偏移去读派生类实例可能出错。
所以返回里带 instances: [{pointer, class_name}]
与 exact_class_count / derived_count / class_name_counts,
请按 class_name 甄别你要的是哪一种。
⚠️ 拿到的指针只在游戏继续运行时有意义:对象可能随时被 GC 回收, 或随场景切换失效。应当立即使用(读字段 / 写字段 / 下 Hook), 不要跨多个步骤长期保存。
Args:
name: 类名(嵌套类型传完整嵌套名,同 runtime_class_info)。
namespace: 命名空间。
image: 程序集名。
max_count: 最多返回多少个实例(默认 100,上限 100000)。
Returns:
{ok, class, engine, count, pointers: [...],
instances: [{pointer, class_name}],
exact_class_count, derived_count, class_name_counts, overflow}
也可能带 unsupported(引擎不支持这条路径,如 Mono 的时机限制)
或 warning(恢复 GC world 失败,游戏可能卡住)。
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| image | No | ||
| max_count | No | ||
| namespace | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare read-only, idempotent, non-destructive, open-world behavior, but the description adds substantial runtime context: GC liveness semantics, IL2CPP vs Mono differences, `unsupported` handling, truncation via `overflow`, derived-class inclusion, pointer lifetime, and a possible GC-restore warning. These are exactly the behavioral traits an agent needs beyond the annotation hints.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The definition is long, but it is well structured with a front-loaded summary, engine table, limitations, warnings, args, and returns. Some implementation anecdotes and repeated warnings could be tightened, but nearly all content serves correct invocation.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
There is no output schema, but the description fully documents the return shape, including `ok`, `engine`, `pointers`, `instances`, `exact_class_count`, `derived_count`, `class_name_counts`, `overflow`, plus `unsupported` and `warning`. Given the engine complexity and pointer-lifetime caveats, this is complete enough for correct use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must carry parameter meaning, and it does: `name` requires full nested names, `namespace` and `image` are identified, and `max_count` is given a default and upper bound. This fully compensates for the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens by stating a specific verb and resource: enumerate live object instances of a class and obtain `instance` pointers. It clearly contrasts this with the prior Hook-based workaround and ties the output to `read_field_value` / `set_field_value` / `hook_method`, so an agent can distinguish it from related siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explains exactly when the tool is needed: those other tools require an object pointer, and this is the direct way to get one. It also states when it will not work, including Mono timing restrictions and struct value types, and frames Hook-based discovery as the inferior alternative.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gc_controlA
暂停/恢复游戏的 GC(垃圾回收)。
Hook 期间建议暂停 GC,避免正在观察的对象被回收掉。 观察结束后务必恢复(disable=False),否则游戏内存会持续增长。
标注上 idempotentHint=False:它是状态开关,disable=True 与
disable=False 是两个不同状态,且「开了没关」会让内存持续增长。
同参数重复调确实无额外影响,但把这个调用标成「幂等」会被客户端读成
「可以随便重试」—— 在一个已经暂停了 GC 的会话里那样做是错的。
探针卸载时会自动恢复 GC(见 agent.js 的 dispose),但那是兜底,
不该替代调用方自己恢复。
Args: disable: True 暂停 GC,False 恢复。
| Name | Required | Description | Default |
|---|---|---|---|
| disable | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Beyond the annotations it explains the consequence of misuse (unbounded memory growth) and pre-empts the idempotency misreading — why idempotentHint=false must not be read by a client as 'free to retry'. It also discloses the automatic restore in agent.js dispose, which is exactly the kind of context annotations cannot carry.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Purpose and the critical warning are front-loaded, and the Args block anchors the parameter. The middle section defending the idempotentHint choice is somewhat meta and longer than an invoking agent strictly needs, though it does prevent a real misuse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a one-parameter stateful mutation with no output schema, everything needed is present: what changes, the risk of leaving it on, restoration obligation, and the fallback cleanup path. Sibling tooling handles the surrounding hook workflow, so nothing essential is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description must carry the single parameter, and it does: 'disable: True pauses GC, False resumes'. It does not flag that the schema default is true, which makes a bare call silently pause GC — a meaningful omission for a stateful toggle, but the core semantics are covered.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The first line states a concrete verb and resource: pause/resume the game's garbage collector. It is unmistakably distinct from siblings like hook_method, unhook, and read_memory, and the toggle nature is spelled out immediately.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives explicit when-to-use (pause during hooking so observed objects aren't collected), when-to-restore (always resume after observation ends, otherwise memory grows), and even documents the safety-net behavior on probe unload that should not replace caller-side restoration. Both the positive and negative conditions are covered.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_diagnosticsARead-onlyIdempotent
检查运行环境:Python、Frida、各引擎解析器是否可用。默认不扫本机进程(见 scan_processes)。
开始工作前建议先调一次,明确「这台机器上能做什么」。 如果某项显示不可用,对应的工具会失败——这是环境问题,不是工具 bug。
Args:
scan_processes: 是否顺带列出本机正在运行的游戏。默认 False。
该扫描实测耗时约 2.7 秒,且与 find_game_processes 职责重复,
所以默认不扫 —— 要列运行中的游戏请直接调 find_game_processes。
| Name | Required | Description | Default |
|---|---|---|---|
| scan_processes | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover safety (readOnlyHint, idempotentHint, non-destructive, closed-world), so the description's job is to add context. It does add useful behavior: the process scan is skipped by default, costs about 2.7 seconds when enabled, and an 'unavailable' result means dependent tools will fail for environmental reasons rather than being buggy. It does not describe what the diagnostics output actually contains, which is the main remaining gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with the purpose and default, then rationale, then the parameter. Mostly tight, though the 'default does not scan local processes' point is stated twice (in the opening and again in the Args block), which is mild redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description should say what the diagnostics return. It enumerates the checked areas (Python, Frida, engine parsers) but not the shape of the result or how unavailability is signaled, leaving a small inference gap for a tool whose whole output is the answer.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description carries the full burden for the single `scan_processes` parameter. It explains the default (False), the concrete cost of enabling it (~2.7s), and why it is redundant with `find_game_processes` — everything an agent needs to decide whether to set it.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource: checking whether the runtime environment (Python, Frida, engine parsers) is usable. It explicitly distinguishes itself from the sibling `scan_processes`/`find_game_processes`, so an agent can tell which tool answers which question.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives explicit timing guidance ('call once before starting work') and explicit routing: for listing running games, call `find_game_processes` instead, because this tool defaults to not scanning and duplicates that responsibility. Both the when and the when-not are stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_sessionARead-onlyIdempotent
查看当前会话状态:选中的游戏、索引统计、运行时注入情况。
排查「为什么查不到类 / Hook 不上」时,先看这个。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The annotations already declare this as read-only, idempotent, non-destructive, and closed-world, so the safety profile is fully covered. The description adds useful scope about what state is inspected and positions it as a first diagnostic step, but it does not describe output freshness, cost, or return shape beyond the three content categories. With annotations doing the heavy lifting, this is adequate but not rich.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two compact sentences, front-loaded with the resource and state categories, followed by the troubleshooting trigger. Every clause adds useful signal, and there is no wasted text.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter, read-only diagnostic tool with no output schema, the description provides enough context to know when and why to call it. It lists the main state categories but does not explain the returned structure in detail; that is a minor gap given the lack of an output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, so the baseline is 4. The description does not need to explain parameter semantics, and it correctly focuses on what the no-argument call returns.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific resource and verb: viewing current session state, and it enumerates the three main contents (selected game, index statistics, runtime injection status). It does not explicitly differentiate itself from similar diagnostic siblings such as get_diagnostics or runtime_info, but the scope is clear enough for an agent to understand what it returns.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives a concrete usage context: when troubleshooting 'why can't find a class / hook fails', look here first. This establishes a priority entry point for diagnosis. It does not name explicit alternatives or exclusions, but the intended situation is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
hook_addressA
在任意地址安装 Hook(不限于托管方法)。适用于原生函数、系统 API、以及「模块基址 + RVA」算出的地址。
适用于:原生游戏函数、系统 API、以及从静态分析里算出的地址 (模块基址 + RVA)。
Args:
address: 目标地址,十六进制(如 "0x7ffa05f7f050")。
args_type: 参数类型列表,逗号分隔(同 hook_method)。
写错规格名会直接报错。
retval_type: 返回值类型(int/uint/float/double/ptr/string/bool)。
max_calls: 最多记录多少次。
backtrace: 是否记录调用栈。
override_retval: 受控改写返回值(默认空串 = 只观察不改)。语义与
取值规则同 hook_method(override_retval=...):支持
int/uint/long/ulong/bool/ptr/float/double,其余当场拒绝。
它进探针的 hooks 表 → hook_status 可见、unhook 可卸。
| Name | Required | Description | Default |
|---|---|---|---|
| label | No | ||
| address | Yes | ||
| args_type | No | ||
| backtrace | No | ||
| max_calls | No | ||
| retval_type | No | ptr | |
| override_retval | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=false, idempotentHint=false and openWorldHint=true, so the description's job is lighter, yet it still adds real behavior: the hook lands in the probe's hooks table, is visible via hook_status, and is removable with unhook. It also warns that an invalid args_type spec fails immediately and that unsupported override_retval types are rejected on the spot. It does not say whether a live session/process is required before calling, which would have made this a 5.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with the scope statement and the hook_method contrast, and the args block is easy to scan. However, the applicability clause is repeated almost verbatim in the opening two paragraphs ('适用于原生函数、系统 API、以及「模块基址 + RVA」算出的地址' twice), which is wasted space.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 7-parameter mutation tool with no output schema, the description covers target identification, argument typing, throttling, backtracing, and return-value override behavior, plus lifecycle integration with hook_status/unhook. It stops short of explaining how captured calls are retrieved (the drain_events sibling) and leaves 'label' undocumented, so an agent still has a small inference to make.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must carry the parameters, and it does: address format (hex example), args_type syntax and failure mode, retval_type enum list, max_calls, backtrace, and the full override_retval semantics with accepted types and the empty-string default meaning. The only gap is the 'label' parameter, which appears in the schema but is never mentioned.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (install hook) and resource (arbitrary address), and explicitly scopes itself as 'not limited to managed methods', which cleanly separates it from the sibling hook_method. An agent can decide between the two without opening either schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives concrete when-to-use conditions: native game functions, system APIs, and addresses computed as module base + RVA from static analysis. It also implicitly routes managed-method hooking to hook_method by contrasting scope and by referencing hook_method's argument semantics.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
hook_methodA
在目标方法上安装 Hook,捕获它的调用(参数、调用来源、返回值)。用 token 指定重载;多候选未指定则拒绝。
风险:Hook 会改变游戏运行行为,且错误的参数类型可能崩溃游戏。 建议先用 find_hook_target 确认落点与 token。
重载:同名方法可能有多个重载,token 各不相同。若目标方法有多个
重载而你又没给 token / param_count,本工具会拒绝猜测并返回
候选清单(ok: false)。这是故意的:盲挂到错误的重载上,
Hook 照样会成功,错误要到很久以后才以「数据不对」的形式暴露。
最可靠的做法是从静态元数据取目标重载的 token 传进来。
Args:
name: 类名。
method: 方法名。
namespace: 命名空间。
image: 程序集名。
args_type: 参数类型列表,逗号分隔,用于解析参数值。
可选:int/uint/long/ulong/bool/float/double/ptr/string/cstring
例:"ptr,int,float"。留空则不解析参数值。
写错规格名会直接报错(不再静默按指针读)。
实例方法的第一个整型位置是 this:想拿对象指针就写
"ptr"(0 参数方法也一样,第 1 个 ptr 即 this)。
label: 自定义标签,便于在事件里识别(默认 "类名.方法名")。
max_calls: 最多记录多少次调用(防止高频方法刷爆事件队列)。
backtrace: 是否记录调用栈(较慢,排障时用)。
token: 目标重载的 token(如 "0x06000A3D")。选重载首选这个,
静态元数据的 class_detail / get_method_source 里就有。
param_count: 目标重载的参数个数(-1 表示不指定)。仅在拿不到 token
且各重载参数个数不同时可用。
retval_type: 返回值读取类型(int/uint/long/ulong/bool/float/double/
ptr/string/cstring)。留空 = 按静态返回类型自动推断,
这是推荐用法:float/double 的返回值在 XMM0 而不在 RAX,
按 ptr 读会给出毫无意义的整数。
override_retval: 受控改写返回值(默认空串 = 只观察不改,与原行为
100% 兼容)。支持 int/uint/long/ulong/bool/ptr/float/double;
其余类型会被当场拒绝(不假成功)。
比 eval_script 手写 Interceptor 强在三点:它进探针的
hooks 表,所以 hook_status 看得见、unhook 卸得掉、
write_memory 的重叠护栏也保护得到。
浮点返回值同样可覆写(实测走「整体换 XMM0 的 ArrayBuffer」,
见 agent.js 的 encodeRetvalOverride)。请配合 hook_status
的 override_retval 字段核对,并用 drain_events 里的
original_retval 对比改前/改后。
Returns: {ok, hook_id, class, method, chosen: {pointer, rva_hex, token}, retval_type, return_type, candidate_count, usable_count} 失败时 {ok: false, error, candidates: [...]}。
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| image | No | ||
| label | No | ||
| token | No | ||
| method | Yes | ||
| args_type | No | ||
| backtrace | No | ||
| max_calls | No | ||
| namespace | No | ||
| param_count | No | ||
| retval_type | No | ||
| override_retval | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations only declare readOnlyHint=false/openWorldHint=true; the description supplies the real risk profile (it alters game runtime behavior, and bad arg types can crash the game) and explains the deliberate refusal-to-guess on ambiguous overloads, including why a wrong hook would silently succeed. It further discloses that override_retval registers in the probe's `hooks` table so hook_status sees it, unhook removes it, and write_memory overlap guards apply.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded correctly: purpose first, then risk, then overload policy, then args, then returns. It is long, and a few details (internal reference to agent.js's encodeRetvalOverride) do not help an agent decide how to call it, but nearly every sentence addresses a genuine failure mode for a 12-parameter tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema exists, yet the description spells out the success payload (ok, hook_id, chosen token/pointer/rva, retval_type, candidate_count) and the failure payload including the candidates list. Combined with the crash risk and overload refusal semantics, an agent has everything needed to invoke it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% and the schema is bare titles, so the description carries the full burden — and does: all 12 parameters are explained, including the allowed type specifiers for args_type/retval_type, the `this`-pointer convention for instance methods, and the default auto-inference for retval_type with the XMM0-vs-RAX rationale.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Opens with a specific verb and resource: install a Hook on a target method and capture its calls (args, call site, return value). It also distinguishes itself from related tools by naming find_hook_target as the prerequisite step and by explaining why this is preferable to a hand-written Interceptor in eval_script.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives explicit workflow guidance ('建议先用 find_hook_target 确认落点与 token') and precise selection rules between `token` and `param_count`, plus an explicit escalation path when neither is supplied. It lacks only a clear 'when not to use this, use hook_address instead' exclusion for raw-address targets, leaving that boundary implicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
hook_statusARead-onlyIdempotent
列出当前所有 Hook 及其触发次数。
触发次数可以用来判断「Hook 装对了没」: 如果挂的是每帧调用的方法却始终 0 次,多半是落点不对。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds value beyond that by explaining what the returned trigger counts mean and how to interpret a zero-count case, which is genuine behavioral context. It does not cover whether a session must be open, though.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences: the first states what the tool returns, and the second pre-emptively explains how to interpret the counts. It is tightly front-loaded with no filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no parameters and no output schema, the description covers the essential: what is listed and how to read the counts. The one gap is that it does not state any prerequisite, such as an active game session or an attached process, which the sibling set (open_game, inject_process) suggests is relevant.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, so the parameter-semantics baseline is 4. There is nothing parameter-related for the description to clarify, and it correctly does not pad with parameter talk.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description gives a concrete verb and resource: '列出当前所有 Hook 及其触发次数' (list all current Hooks and their trigger counts). This clearly distinguishes the tool from the action-oriented siblings hook_method, hook_address, and unhook. It does not explicitly name a sibling, but the resource is specific enough to make the distinction obvious.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives a concrete diagnostic scenario: use the trigger counts to judge whether a Hook was installed correctly, and a zero count on a per-frame method indicates a wrong target. This is clear usage context, though it does not mention what to do instead or which alternative tool to use when the diagnosis fails (for example, find_hook_target or drain_events).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
inject_processAIdempotent
把运行时探针注入正在运行的游戏进程。目标换了游戏时会把会话身份与索引一起换过去,并在返回里给 context_switched。
注入后才能使用 runtime_* / hook_* / drain_events 等在线工具。 同一个进程只会注入一次(重复调用会复用,不会重复 Hook)。
会话上下文会自动跟随目标:注入的进程若属于另一个游戏,会话身份
(game_dir / engine / metadata_path)与静态索引会一起切过去,返回里给
context_switched 说明换了哪个游戏。为什么必须切:否则 search_*(旧游戏)
与 runtime_*(新游戏)属于两个游戏,token 对账这把「尺子」本身就是错的。
反推不出目标属于哪个游戏时不猜,改用 context_warning 如实提示。
权限:不需要管理员。实测(2026-10)普通用户权限注入 IL2CPP 游戏
成功(本进程与游戏进程的完整性级别都是 Medium,attach 后取运行时、
枚举实例都正常)。唯一要匹配的是权限级:游戏若以管理员身份运行
(完整性级别 High),普通权限的 Agent 才注入不进去。
游戏带反调试 / 反注入时也会失败 —— 那是保护机制,不是权限问题。
Args: pid: 目标进程号。留空则自动找当前游戏的主程序。 auto_find: 没给 pid 时是否自动查找。 preferred_module: IL2CPP 模块名,默认自动识别 (GameAssembly.dll / libil2cpp.so)。
Returns: {ok, pid, init: {module, base, api_available, api_missing, fallbacks}, context_switched?, context_warning?}
| Name | Required | Description | Default |
|---|---|---|---|
| pid | No | ||
| auto_find | No | ||
| preferred_module | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Adds substantial context beyond annotations: permission requirement (no admin needed, measured 2026-10), the integrity-level condition that actually causes failure (High vs Medium), anti-debug protection as a distinct failure mode, and forced session-context switching with context_switched/context_warning signaling. The idempotency claim matches idempotentHint=true and destructiveHint=false is consistent with a non-destructive attach.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded and generally well-organized, but the session-context switch is explained three times (first sentence, the dedicated paragraph, and again in the Returns section), and the '为什么必须切' rationale plus the token-reconciliation metaphor consume space without adding actionable information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-required-param, no-output-schema tool, the description covers inputs, the return shape (ok, pid, init with module/base/api_available/api_missing/fallbacks, plus context_switched/context_warning), failure modes, and permission setup. An agent has everything needed to call it and interpret the result.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description carries the full burden and does: pid (blank → auto-locate main program), auto_find (whether to auto-search without pid), preferred_module (IL2CPP module name, auto-detected as GameAssembly.dll / libil2cpp.so). Each parameter gets meaning the bare schema lacks.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb+resource: injecting a runtime probe into a running game process. It also states the consequence (enables runtime_*/hook_*/drain_events) and the scope (one injection per process), which clearly separates it from siblings like hook_method or find_game_processes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states the prerequisite relationship — the online tools runtime_*/hook_*/drain_events only work after injection — and that repeat calls reuse the existing session rather than re-hooking. It does not route the agent on how to obtain a pid (find_game_processes is a sibling), only that blank pid triggers auto-find.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
inspect_binaryARead-onlyIdempotent
分析 PE 文件(exe/dll):架构、节区、导出表、导入表、运行时类型。
用于判断游戏是否加壳、是否托管、以及找出可 Hook 的导出函数。
关键结论(architecture / runtime / export_count / section_count)
会同时提到顶层与 pe 子对象里:Agent 通常只关心「这是不是 x64」
「这是不是 .NET」「有没有导出函数」,不该为了拿这几个值多下钻一层。
完整的节区表、导入 DLL 列表留在 pe 里。
Args: path: 可执行文件或 DLL 路径。
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly/idempotent/non-destructive, and the description adds genuinely new behavioral detail: key conclusions are duplicated at the top level and inside `pe`, and the full section/import data stays in `pe`. That is real information about the response shape that the annotation set does not carry, though it does not discuss cost, rate limits, or handling of non-PE files.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three short paragraphs plus an Args block, front-loaded with the core purpose followed by use cases. The bolded emphasis on the duplicated fields is slightly redundant but earns its place by warning against unnecessary drilling.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description does enough: it names the returned top-level keys, explains the `pe` sub-object's contents and its relationship to the top level. Minor gaps remain, such as failure behavior on non-PE or missing files, but nothing blocks a correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% and the single `path` parameter has no schema description, so the description must compensate. It partially does by specifying that path accepts an executable or DLL file path, narrowing the expected input beyond a bare string.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource (analyze PE files, exe/dll) and enumerates the extracted artifacts: architecture, sections, exports, imports, runtime type. This clearly separates it from siblings like decompile, inspect_game and find_hook_target, which operate at different levels.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives three concrete use cases: detecting packing, detecting whether the binary is managed (.NET), and locating exportable functions to hook. There is no explicit exclusion or pointer to an alternative (e.g., when to prefer find_hook_target instead of reading the export table), so it stops short of full routing guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
inspect_gameARead-onlyIdempotent
探测一个游戏目录:识别引擎、找出主程序与关键文件。
本项目的使用方式是「一次只针对一个游戏项目目录」, 所以不必去扫全机有哪些游戏 —— 直接把目录传进来即可。
Args: game_dir: 游戏安装目录。
Returns: {ok, engine, main_exe, il2cpp/mono/ue 的关键路径, ...}
| Name | Required | Description | Default |
|---|---|---|---|
| game_dir | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly/idempotent/non-destructive/openWorld=false, so the safety bar is low, yet the description still contributes a return-shape sketch ({ok, engine, main_exe, il2cpp/mono/ue key paths}) plus the scope constraint that it inspects one directory rather than the machine. It omits cost/performance expectations and what happens on an unrecognized or invalid directory.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with the core purpose, then a short usage note, then structured Args/Returns. The middle sentence about not scanning the whole machine is slightly rambling but earns its place as a scoping rule; nothing else is filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a one-parameter, read-only probe with strong annotations, the description covers purpose, scope, and an inline summary of return keys, which substitutes adequately for the absent output schema. A brief note on failure modes (non-game directory, missing exe) would close the remaining gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The single parameter has 0% schema description coverage (only the bare title 'Game Dir'), so the description must carry the semantics. It does clarify game_dir as the 游戏安装目录 (game installation directory) rather than any arbitrary folder or process name, but that is the minimum needed and no format, path style, or read-permission constraints are given.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb+resource (探测一个游戏目录) and enumerates the concrete outputs: engine identification, main executable, and key files. That makes it clearly distinguishable from neighbors like inspect_binary, detect_ue, and ue_profile, which operate on binaries or specific engine families rather than a whole install directory.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly frames the usage as 'one game project directory at a time' and tells the agent not to enumerate all games on the machine, with the action being 'just pass the directory in'. It gives an operative condition but never names an alternative tool (e.g. detect_ue or inspect_binary) for deeper or engine-specific follow-up.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
launch_gameA
启动游戏并在游戏初始化之前注入探针(能抢在初始化前挂钩)。
同名进程已在跑时直接拒绝(避免白等 60 秒再报「IL2CPP 未就绪」);
exe 指向另一个游戏时会自动切换会话上下文(建新索引),
返回里给 context_switched 说明换了哪个。
比先手动开游戏再 inject_process 更强:能在对象被创建之前就装好 Hook, 适合拦截只执行一次的初始化逻辑。
会话上下文会自动跟随 exe:若它属于另一个游戏,会话身份与静态索引
会一起切过去(并建索引),返回里给 context_switched 说明。
否则 search_* 与 runtime_* 会分属两个游戏(实测过:index 140 个 image
对上运行时 143 个,image_count_matches=false,而工具全程 ok:true)。
反推不出 exe 所属游戏时不猜,用 context_warning 如实提示。
Args:
exe: 游戏可执行文件路径。留空则用当前会话识别出的主程序。
args: 附加命令行参数。按 Windows 习惯拆:空白分隔,双引号内保留空白
(所以含空格的路径要写成 -path "C:\Games\My Game\a.txt")。
反斜杠不是转义符,Windows 路径可以直接写。
| Name | Required | Description | Default |
|---|---|---|---|
| exe | No | ||
| args | No | ||
| preferred_module | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=false, openWorldHint=true, idempotentHint=false, destructiveHint=false, and the description adds real context beyond them: a refusal path for already-running processes, automatic session-context switching with an index rebuild, the context_switched return field, and a context_warning instead of guessing when the exe's game can't be inferred. It even explains the failure mode it prevents (index/runtime image mismatch with ok:true). It does not cover what happens to the previously active session or timing/return payload shape, keeping it below 5.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with the core action and the key refusal rule, but the session-context-switching behavior is explained twice in near-identical paragraphs, and the parenthetical about 140 vs 143 images is over-detailed. The Args block is efficient, but the body could be roughly halved without losing information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a launching/mutating tool with no output schema, the description covers prerequisites (session identity follows exe), failure modes (already-running process, uninferable game), and names the return fields the agent should inspect. The only real hole is the undocumented `preferred_module` parameter and what a successful launch returns beyond context_switched.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description carries the burden and largely succeeds: `exe` documents the empty-string default (use the session's identified main program) and `args` documents Windows-style splitting, quote handling for spaced paths, and that backslashes are not escapes. The third parameter, `preferred_module`, is never mentioned anywhere, leaving one of three parameters completely undocumented.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb+resource (launch game + inject probe before initialization) and immediately differentiates from the sibling inject_process by explaining why launching first is stronger. The scope is unambiguous and an agent can pick it over inject_process without opening a schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly names when to use it (intercepting one-shot initialization logic before objects exist), the alternative it beats (manually starting the game then inject_process), and a hard refusal condition (same-name process already running, which wastes 60s). That is when/when-not/alternative all in one place.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_imagesARead-onlyIdempotent
列出游戏里的程序集(dll)及各自的类型数量。支持 offset/limit 翻页并如实给 has_more。
用来判断「游戏逻辑主要在哪个 dll」,从而缩小搜索范围。
Args:
pattern: 名称子串过滤(如 "TeamTapas")。
offset: 从第几条开始(翻页用)。
limit: 本页最多几条。被截断时 has_more 为 true。
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| offset | No | ||
| pattern | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so the safety profile is covered. The description adds behavior the annotations don't: offset/limit paging and the fact that has_more is returned truthfully when a page is truncated. Missing only ordering/return-shape details, which is minor here.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The purpose and the paging rule are front-loaded, followed by a compact Args block. Every line carries information, with no filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a three-parameter read-only listing tool with no output schema, the description covers what is listed (dlls plus type counts), how to page (offset/limit/has_more), and why to call it. Nothing an agent needs in order to call it correctly is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must carry the parameter meaning, and it does: pattern is a name substring filter (with an example), offset is the start index, limit is the page size. Defaults aren't restated, but the semantics are fully clear.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific action and resource: list the game's assemblies (dlls) with their type counts, plus pagination. This clearly differentiates it from siblings like search_classes or class_detail. The only friction is that the tool name 'list_images' suggests images rather than assemblies, so the description has to do remedial work.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives a concrete decision rule: use it to determine which dll holds the game logic and thereby shrink the search space. It doesn't name an explicit alternative when this tool is the wrong choice, but the intended scenario is unambiguous.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ocrAIdempotent
OCR 识别文本并给屏幕绝对坐标(可直接用于点击)。只对给定 ROI 做(实测整屏 4.1s vs ROI 数十 ms)。
matched_count==0 是「本次没找到」而非「不存在」;
save_on_failure 可在没匹配到时留下截图证据。
这是「弱视觉」的主力:验收时绝大多数判断只需要 「屏幕上有没有这几个字、它在哪」。
只对给定的区域做 OCR(实测整屏 2560x1440 要 4.1 秒,而 ROI 通常几十毫秒)—— 这也是同类项目的标配做法。
坐标一律是屏幕绝对坐标,可直接喂给点击;coordinate_space
字段会明说是 screen_absolute,避免「拿裁剪图坐标去点」这个经典坑。
匹配 expected 时的语义(重要):
· matched_count == 0 的意思是「本次没找到」,
不等于「游戏里没有」—— 可能界面还没加载、或文字被 OCR
拆成了多个框。返回里的 note 会写明这一点。
· best_match 取的是置信度最高的那条,不是第一条。
Args:
region: "x,y,w,h" 屏幕绝对坐标;与 window 二选一。
window: 窗口标题子串;用它定 ROI。
expected: 期望出现的文本;给了就把命中的单独列出来。
match: contains(默认)/ exact / regex。
threshold: 置信度下限,低于它的丢弃(默认 0.3)。
case_sensitive: 文本匹配是否区分大小写。
max_items: 最多返回多少个文本框。
save_on_failure: 给了路径时,若没匹配到就把当时的截图存到这里
(等价 MaaFramework 的 save_on_error)—— 失败要留证据。
Returns: {ok, engine, count, results: [{text, score, box, center, click_point}], texts, matched, matched_count, best_match, click_point, coordinate_space: "screen_absolute", image, ...}
| Name | Required | Description | Default |
|---|---|---|---|
| match | No | contains | |
| region | No | ||
| window | No | ||
| expected | No | ||
| max_items | No | ||
| threshold | No | ||
| case_sensitive | No | ||
| save_on_failure | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Adds real behavior beyond the annotations: cost profile (4.1s full-screen 2560x1440 vs tens of ms for ROI), the critical semantic that matched_count==0 means 'not found this run' rather than 'does not exist', that best_match is highest-confidence rather than first, and that coordinate_space is guaranteed screen_absolute. It also explains the file write implied by readOnlyHint=false via save_on_failure, so description and annotations are consistent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with the key claim, but the ROI-vs-full-screen point is repeated three times and the 4.1s vs tens-of-ms benchmark is stated twice verbatim, plus the matched_count==0 caveat appears both in prose and again in the 'matching semantics' block. Roughly a third of the text is redundant.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description fully specifies the return shape (ok/engine/count/results/texts/matched/matched_count/best_match/click_point/coordinate_space/image) and the field semantics that matter. For an 8-parameter, open-world, side-effecting tool, nothing an agent needs to call it correctly is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% with no enums and no defaults documented in prose, so the description carries full burden — and it does: it gives the 'x,y,w,h' screen-absolute format for region, the window-title-substring alternative, the three match modes (contains/exact/regex, which the schema does not enumerate as an enum), the threshold 0.3 default, and the failure-screenshot semantics of save_on_failure.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb+resource (OCR recognition of screen text) plus the differentiating output guarantee (screen-absolute coordinates directly usable for clicking). An agent can immediately distinguish this from siblings like capture_screen, wait_for, or verify_state.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly frames the tool as the 'weak vision' workhorse and gives the decision rule — most acceptance checks only need 'are these characters on screen and where'. It also names the region-vs-window choice and the save_on_failure option. It stops short of naming sibling tools or stating when NOT to use it (e.g. when pixel-level visual comparison is needed).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
open_gameAIdempotent
选定游戏,并构建(或复用)它的元数据索引(跨引擎自动识别)。
之后所有查询工具都以这个游戏为上下文。切换游戏会重置会话 (已注入的运行时会被安全卸载)。
支持三种引擎,会自动识别: · IL2CPP — 元数据是 global-metadata.dat,逻辑在 GameAssembly.dll · Mono — 元数据是托管 dll(通常是 Assembly-CSharp.dll) · UE — 无集中元数据(能力以 get_diagnostics 报告为准)
重复调用同一个游戏不会重建(返回 reused=true,通常 10ms 内返回)。
Args: game_dir: 游戏安装目录(推荐;会自动识别引擎并定位元数据文件)。 metadata_path: 直接指定元数据文件(IL2CPP 用 global-metadata.dat, Mono 用某个 .dll;目录结构不标准时用)。 engine: 强制指定引擎(il2cpp / mono / ue),一般不用填。 cache_dir: 索引缓存目录,默认 ~/.gamemod/cache。 force_rebuild: 强制重建索引(怀疑缓存损坏时用)。
Returns: {ok, engine, engine_label, metadata_path, index: {type_count, method_count, field_count, capabilities...}, elapsed, reused}
| Name | Required | Description | Default |
|---|---|---|---|
| engine | No | ||
| game_dir | No | ||
| cache_dir | No | ||
| force_rebuild | No | ||
| metadata_path | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Goes well beyond the annotations by disclosing that switching games resets the session and safely unloads an already-injected runtime — a real side effect an agent must know about. It also explains caching behavior and the reused=true fast path, matching the idempotentHint while adding actionable detail on when a rebuild does or does not occur.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with the core action and session-role statement, then organized into engine bullets, repeat-call note, Args, and Returns. It is somewhat long and the Returns block lists a raw dict shape, but each section carries distinct information without filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description supplies the return shape (ok, engine, metadata_path, index counts, elapsed, reused). Combined with engine support notes and the pointer to get_diagnostics for UE capabilities, an agent has everything needed to call this correctly and interpret the result.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description fully compensates: game_dir as the recommended entry, metadata_path for nonstandard layouts with per-engine file names, engine for forced override ('generally not needed'), cache_dir's default of ~/.gamemod/cache, and force_rebuild's trigger condition. Every one of the five parameters gains meaning not present in the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Opens with a specific verb+resource: selects a game and builds (or reuses) its metadata index, with cross-engine auto-detection spelled out for IL2CPP/Mono/UE. It also states the tool's role as session-context setter for all downstream query tools, which cleanly separates it from siblings like find_game_processes or inspect_game.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly says all query tools afterwards use this game as context and that switching games resets the session, and it documents the cheap repeat-call path (reused=true, ~10ms). It does not name a competing sibling (e.g., inspect_game vs find_game_processes) or state when not to call it, so it stops short of full routing guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
probe_logARead-onlyIdempotent
读游戏日志尾部并按正则过滤(编码自动 utf-8/gbk)。只读、不消费,可反复轮询。
同类 Bot 项目普遍没有这条「用日志确认结果」的通道。
为什么单独做这件事:调研的 7 个游戏自动化 Bot 项目里, 没有一个用游戏日志判断结果 —— 它们靠视觉、注册表或 CDP。 而「通过日志确认结果」恰恰是最可靠的验收通道之一 (Mod 自己的输出、游戏自己的报错都在日志里),所以这里补上。
做法刻意保守:
· 只读尾部 tail_bytes(默认 256 KB)—— 日志动辄几百 MB,
绝不整个读进来;
· 给了 pattern 就只返回匹配行,并额外给 matched_count,
便于断言「没有出现 ERROR」这类否定式判据;
· 编码自动探测(utf-8 → utf-8-sig → gbk)—— 中文游戏常见 GBK。
⚠️ 它是只读的,不消费日志(不像 drain_events 那样取走即没)。
同一次读取可以反复做,所以适合轮询等待某个日志行出现。
Args: path: 日志文件路径。 pattern: 正则;只返回匹配行。留空返回尾部所有行。 max_lines: 最多返回多少行(默认 200,取最后 N 行)。 tail_bytes: 从文件末尾读多少字节(默认 262144)。
Returns: {ok, path, size, encoding, total_lines_in_tail, returned, lines: [{line_no, text}], matched_count?, has_more?, truncated_head}
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| pattern | No | ||
| max_lines | No | ||
| tail_bytes | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly/idempotent/non-destructive, but the description goes further: it discloses that only the tail is read and never the whole (possibly hundreds of MB) file, how encoding detection falls back utf-8 → utf-8-sig → gbk, and that reads do not consume the log. These are real behavioral traits beyond the annotation set.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The operational content is front-loaded and correct, but a large block of the text is research justification ('of 7 surveyed bot projects, none used logs…') that does not help an agent decide or invoke. That padding dilutes an otherwise tight definition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description supplies the full return shape including encoding, total_lines_in_tail, matched_count, has_more and truncated_head, plus defaults for every parameter. An agent has everything needed to call and interpret results, even though structured fields are sparse.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must carry all parameter meaning — and it does: path, pattern (regex, empty = all tail lines), max_lines (default 200, returns the *last* N), tail_bytes (default 262144 bytes). The 'last N lines' and 'tail bytes' semantics are precisely the non-obvious parts the schema omits.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb+resource and scope: reads the *tail* of a game log and filters by regex, with automatic encoding detection. It also explicitly distinguishes itself from the sibling `drain_events` (non-consuming vs. consuming), so an agent can pick between them without opening either schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly gives the use case — repeated polling until a log line appears — and names the alternative (`drain_events`) plus the condition that separates them (consume-once vs. re-readable). It also states the negative-assertion use case (`matched_count` for 'no ERROR appeared'), which is a concrete when-to-use signal.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_field_valueARead-onlyIdempotent
读取某个实例或静态字段的原始值(静态字段传 instance="static")。读几个字节由字段类型决定(bool 1 / int 4 / long·double·引用 8)。
自动完成三步:运行时查字段偏移 → 算出字段地址 → 读内存。
读几个字节由字段类型决定(_field_read_width):bool 读 1、int 读 4、
long/double/引用类型读 8。原来固定读 8 字节,4 字节字段会连带读到相邻
字段的 4 个字节 —— 既给出无意义的 as_int64(两个字段拼出来的数),
也会在字段贴近页尾时把一次本可成功的读取变成假失败。
返回里 read_width 是实际读取的字节数,解释字段也按宽度给:
1 → as_int8/as_uint8/as_bool;2 → as_int16/as_uint16;
4 → as_int32/as_uint32/as_float;8 → 再给 as_int64/as_double/as_pointer。
局限:只适合基础类型字段(int/float/bool/enum 等)。 引用类型字段读到的是指针,要读内容需再解引用(用 read_memory)。
静态字段:把 instance 传成 "static"(或空串)即可读静态字段,
不需要对象指针。这是 Mono 上拿单例指针的正路 —— Mono 的
find_instances 受官方限制常常返回 unsupported,而
GameManager.Instance 这类静态字段读出来的 as_pointer 就是实例指针
(宽度 8 的引用类型),可以直接喂给本工具的 instance 去读实例字段。
静态字段会连同基类一起查(declared_by 告诉你它声明在哪个类上)。
Args:
instance: 对象指针(十六进制)。可从 Hook 事件的 args[0] 里拿到。
传 "static" 表示读静态字段(不需要对象指针)。
name: 类名。
field: 字段名。
namespace: 命名空间。
image: 程序集名。
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| field | Yes | ||
| image | No | ||
| instance | Yes | ||
| namespace | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly/idempotent/non-destructive, but the description adds material behavior beyond them: per-type read width, the rationale for width-based reads (avoiding adjacent-field contamination and false failures near page ends), the read_width return field and the cast variants keyed by width, static field lookup including base classes (declared_by), and the 'runtime offset → address → read' sequence.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The core facts are front-loaded, but the width rule (bool 1 / int 4 / long·double·ref 8) is stated twice in near-identical wording, and the historical aside about previously always reading 8 bytes is a changelog rather than guidance for an agent. Real content, but trimmed it would be materially shorter.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema exists, yet the description explains the return shape (read_width plus the as_* casts by width), covers the static-field path, and names the failure mode it avoids. For a 5-parameter read tool, an agent has everything needed to call and interpret it.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must document all parameters. It does: instance (hex pointer, sourced from Hook event args[0], or "static"), name (class), field (field name), plus namespace and image. The latter two are only labeled ("命名空间", "程序集名") with no format or sourcing guidance, which keeps this from being a 5.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource: reads the raw value of an instance or static field. It also scopes the tool by field type (basic types vs. reference types whose contents require read_memory) and by instance mode ("static" for static fields), so an agent can distinguish it from read_memory and set_field_value without opening the schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives explicit routing: use read_memory to dereference pointer fields, pass instance="static" for static fields, and explains that a static singleton field (for example, GameManager.Instance) is the intended way to obtain an instance pointer on Mono, since find_instances often returns unsupported. It also states the limitation (basic-type fields only) and the payload it returns (as_pointer), which is enough for an agent to choose it correctly.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_memoryARead-onlyIdempotent
读取游戏进程内存(十六进制返回)。
用于:确认字段偏移对不对、读对象原始字节、观察内存变化。
Args: address: 地址(十六进制,如 "0x1a2b3c4d")。 size: 读取字节数(上限 16 MB)。
| Name | Required | Description | Default |
|---|---|---|---|
| size | No | ||
| address | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly, idempotent, non-destructive and openWorld, so the safety profile is covered. The description adds genuinely useful behavior - hex-formatted output and a 16 MB size ceiling - but says nothing about failure modes, such as an unreadable or invalid address, or whether an open session/process is required.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded one-line purpose, then a compact purpose list, then an Args block. Every sentence adds information; there is no filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a two-parameter read tool with no output schema this covers the essentials (format, limit, use cases). It is missing the preconditions that matter for a process-memory reader - whether a session or opened process is required - and any hint about error behavior on partial reads.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must carry the parameter meaning and it largely does: address is a hex string with a concrete example ("0x1a2b3c4d"), and size is a byte count capped at 16 MB. Only the default value (16) is left to the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource (read game process memory) plus the return encoding (hex). This is enough to separate it from write_memory and eval_script, though it never explicitly contrasts itself with the closest sibling, read_field_value.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Lists three concrete use cases (verifying field offsets, reading raw object bytes, observing memory changes), which gives a clear context for invocation. It stops short of exclusions or naming an alternative (e.g. use read_field_value when the type is known), so it falls one notch below full marks.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_query_resultARead-onlyIdempotent
按句柄翻页读取之前某次查询的完整结果;给了 pattern 就在结果内再过滤。
列表类工具单次只返回一页,但完整结果留在句柄里。
(原先独立的 search_query_result 已按契约第 3 条合并进来 ——
它就是本工具在 pattern="" 时的特例。)
两个用途共用本工具:
只看第 500~550 条 → 只给
offset/limit;在这一批结果里再找含某子串的 → 再加
pattern(大小写不敏感)。
两者的成本不一样:纯翻页只解析取到的那一页(结果集是惰性物化的, 见
engine/index.py的_RowSource);而pattern要看每条的值才能 过滤,必须把整个结果集解析一遍。所以在几万条的句柄上, 纯翻页是毫秒级,带pattern会明显更慢 —— 缩小范围优先用search_*的参数(pattern/subtype_of/owner/assembly)。
原先另有一个
search_query_result,实测它在pattern=""时与本工具 输出完全相同 —— 它就是本工具的特例。按契约第 3 条(单一职责: 一个是另一个的特例就合并)已删除,并入pattern参数。
句柄有两个来源,本工具都能读:
search_*这类静态查询登记的索引句柄, 以及响应超限被截断时登记的cap-句柄(那种句柄可能在没有索引时也存在)。 句柄只在它所属的那一个会话内有效;过期时返回available_handles列出当前还能用的,绝不静默换成另一个结果集。
Args: handle: search_classes 等返回的 handle。 offset: 起始位置。 limit: 本页条数(上限 2000)。 pattern: 在结果集内二次过滤的子串;留空表示不过滤(纯翻页)。
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| handle | Yes | ||
| offset | No | ||
| pattern | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Beyond the annotations (`readOnlyHint`, `idempotentHint`, `destructiveHint: false`), the description discloses that pure pagination is lazy and fast while `pattern` forces full result-set parsing, and that handles are session-scoped and return `available_handles` on expiry rather than silently switching results. These are meaningful operational behaviors not captured in the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the core operation and uses clear chunks for usage modes, cost, and handle validity. It is somewhat repetitive: the merged `search_query_result` history is explained twice, which slightly dilutes conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a read tool with no output schema and no structured parameter descriptions, the description is largely complete: it covers operation, usage modes, cost, handle validity, and expiry behavior. The remaining gap is that it does not explicitly describe the returned page shape or pagination metadata.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description carries the full burden and does so: `handle` comes from `search_classes`-type tools, `offset` is the start position, `limit` is page size with an upper bound of 2000, and `pattern` is a case-insensitive substring filter where empty means no filtering. It also explains the two handle sources (`search_*` indexes and `cap-` truncated-result handles).
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The first sentence states a specific verb and resource: paginated reading of a prior query's complete result by handle, plus optional in-result filtering. It distinguishes the two modes and references the removed sibling `search_query_result` as a special case, so the agent can tell what this 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.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly separates two usage modes: pure pagination with `offset`/`limit`, versus filtering with an added `pattern`. It also explains the cost difference and advises narrowing with `search_*` parameters before using `pattern`, which is exactly the routing guidance an agent needs.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
runtime_class_infoARead-onlyIdempotent
查类的运行时实况:真实字段偏移与方法真实地址(RVA)。
嵌套类型请传完整嵌套名(search_classes 的 nested_name);
短名命中多个时拒绝并给 candidates,不替你猜。
与静态 class_detail 的区别(很重要): · 静态元数据里的字段没有偏移(偏移是运行时泛型实例化后才定的) · 静态元数据里的方法只有 token,没有地址 · 这里给出的是运行时真实值 —— 这才是能直接用来 Hook 的落点
嵌套类型请传完整嵌套名:IL2CPP 的 namespace 只属于最外层类型,
嵌套类型(状态机 State、协程体 d__0、私有内部类)的命名空间是空的、
只有短名。实测 IL2CPP 样本 20,072 个类型里 7,056 个(35%)是嵌套类型,
名为 State 的类型有 131 个而只有 1 个是顶层。所以查嵌套类型时 name
要写成完整嵌套名(如 "TeamTapas.ProjectR.UI2.RUI_FloatingUI.State",
从 search_classes 的 nested_name 直接抄)。只传短名而命中多个时,
本工具返回 ok: false + ambiguous: true + candidates,不会替你猜。
Args:
name: 类名(短名;嵌套类型请传完整嵌套名)。
namespace: 命名空间(可选)。不给也能用:会按短名在顶层类型
里解析,唯一才采用;命中多个则返回 ambiguous: true +
candidates,让你自己指定。嵌套类型必须用完整嵌套名
(candidates[].full_name)—— 只用短名会被拒绝,
不会随便挑一个(短名会撞上同名的嵌套枚举/状态机)。
image: 程序集名(可选,如 "TeamTapas.ProjectR.dll")。
method_filter: 只看名字含该子串的方法(类方法很多时用)。
Returns: {ok, full_name, fields: [{name, type, offset, is_static}], methods: [{name, token, pointer, rva_hex, in_module, param_count}]}
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| image | No | ||
| fields | No | ||
| methods | No | ||
| namespace | No | ||
| method_filter | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Goes well beyond the annotations: it discloses the ambiguity-rejection behavior, the full return shape in a `Returns:` block (which matters since there is no output schema), and the empirical justification (35% of types are nested). Minor gap: it never states the prerequisite that a live session/attached process is required, and the `Returns:` block reads as unconditional while the schema lets callers turn fields/methods off.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The core message is front-loaded, but the full-nested-name rule is stated three separate times (opening line, the '嵌套类型请传完整嵌套名' section, and again under `namespace`), and the 20,072/7,056/131 statistics are more justification than the agent needs. Roughly a third of the text is redundant.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 6-param read tool with no output schema and no annotation detail on returns, the `Returns:` block plus the ambiguity contract covers most of what's needed. What's missing is the prerequisite context (does a game need to be open/attached first?) and the two output-suppressing booleans.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description carries the full burden, and it does document `name`, `namespace` (including "不给也能用" fallback semantics), `image`, and `method_filter` in real detail. However the two boolean toggles `fields` and `methods` present in the schema are never mentioned, leaving 2 of 6 parameters undocumented.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a concrete verb and resource ("查类的运行时实况") and immediately pins the distinctive output: real field offsets and method RVAs. It also contrasts itself with the sibling `class_detail` on exactly the axis that matters (static metadata has no offsets/addresses), so an agent can discriminate without opening a schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicit routing rules: use this instead of static `class_detail` when you need hook-viable offsets/addresses; use `method_filter` when a class has many methods; use `search_classes`'s `nested_name` for nested types. It also states the failure condition precisely (short name → `ok: false` + `ambiguous: true` + `candidates`) and refuses to guess, so the agent knows the recovery path.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
runtime_infoARead-onlyIdempotent
查看已注入游戏的探针状态:IL2CPP 模块、映像数量、可用 API。含静态/运行时一致性自检(image_count_matches)。
一致性自检:image_count 应与静态索引里的程序集数量吻合;
不吻合说明探针挂到的可能不是同一个游戏实例,需要排查。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly, idempotent and openWorld, so the safety profile is covered. The description adds real value beyond them: what the response contains and how to interpret image_count_matches as evidence of a mismatched game instance.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short, front-loaded sentences: the first names what is inspected, the second explains the self-check. Bold markers are used for emphasis without padding.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description carries the return-shape burden and does cover the principal fields plus the diagnostic interpretation. It omits any note on what a healthy versus unhealthy 'available APIs' listing looks like, but an agent can still call it confidently.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, so the baseline is 4; there is nothing further the description could add on parameter meaning.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource: view the probe status of the injected game, enumerating IL2CPP modules, image count and available APIs. That distinguishes it from generic siblings like get_diagnostics or list_images, though it never names those siblings explicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The consistency-check paragraph implies this is called to confirm the probe is attached to the right game instance and to troubleshoot otherwise, but there is no explicit statement of when to prefer this over list_images, get_diagnostics or runtime_class_info.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
scan_patternARead-onlyIdempotent
在游戏模块里做 AOB(特征码)扫描。这是兜底手段 —— 优先用元数据 + RVA 定位。
⚠️ 这是兜底手段。优先用元数据 + RVA 定位: 本工具集的核心优势就是「不用扫内存也能找到 Hook 落点」。 只有当符号被剥离、或目标是原生代码时,才用扫描。
Args: pattern: 十六进制特征码,支持通配符 "??"。 例:"48 8B ?? ?? E8"。 module: 限定模块名(默认当前 IL2CPP 模块)。 max_results: 最多返回多少个命中。
| Name | Required | Description | Default |
|---|---|---|---|
| module | No | ||
| pattern | Yes | ||
| max_results | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover readOnly/idempotent/non-destructive/openWorld, and the description adds that the default scope is the current IL2CPP module and that this is the discouraged path — implying it is more costly than symbol lookup. It does not explicitly state the cost or that scanning a large module can be slow, but nothing contradicts the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with purpose and the fallback warning, then a clean Args block. The warning is, however, stated twice almost verbatim (bold line plus the ⚠️ paragraph), which is redundant text that could be trimmed.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 3-parameter tool with no output schema, the definition never says what a hit looks like — module + RVA, absolute address, or count — nor whether offsets are relative to the module base, which matters since the whole point is to feed a hook target. Adequate but leaves the return shape to guesswork.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description must carry the load and it does: it gives the pattern syntax (hex with "??" wildcards) plus a concrete example "48 8B ?? ?? E8", states module defaults to the current IL2CPP module, and explains max_results as a cap on hits returned.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a concrete verb+resource: perform an AOB (signature) scan inside a game module. It also positions the tool against the sibling approach (metadata + RVA via find_hook_target), so an agent can tell immediately what this does and what it is not for.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly names itself as the fallback (兜底手段) and says to prefer metadata + RVA localization first, then gives the precise conditions where scanning is warranted: symbols stripped, or target is native code. Both when-to-use and when-not-to-use are stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_classesARead-onlyIdempotent
搜索游戏里的类、结构体、枚举 —— Mod 开发最主要的入口。支持按基类与程序集过滤。
返回结果里带 handle,结果集较大时可用 read_query_result 翻页,
并可用它的 pattern 参数在结果内再过滤。
下游工具该用哪个名字:用 nested_name,不要用 full_name。
嵌套类型(状态机 State、协程体 <Xxx>d__0、私有内部类)的
full_name 只是短名(IL2CPP 的 namespace 只属于最外层类型),
实测 20,072 个类型里有 131 个叫 State,只有 1 个是顶层。
拿短名去查,会命中一堆同名类型,或直接被判为歧义而拒绝。
nested_name(如 Outer.Inner)才是能唯一定位的那个。
Args: pattern: 名称子串(大小写不敏感)。空表示不过滤。 subtype_of: 只要继承自该类型的(如 "UnityEngine.MonoBehaviour")。 assembly: 按程序集名过滤(子串,如 "TeamTapas")。 only_enums: 只要枚举(找游戏常量表很有用)。 limit: 本页最多返回多少条(上限 2000)。
Returns: {ok, handle, total, returned, has_more, items: [{full_name, nested_name, namespace, method_count, field_count, is_enum, image, token}]}
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| offset | No | ||
| pattern | No | ||
| assembly | No | ||
| only_enums | No | ||
| subtype_of | No | ||
| exclude_compiler_generated | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover readOnly/idempotent/non-destructive, and the description adds real value on top: results carry a `handle`, large result sets must be paged, ambiguous short names are rejected outright, and the 2000-item page cap. It omits the prerequisite that a game session must be open (open_game/get_session are siblings), which is the main behavioral gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Purpose and filters are front-loaded, then the Args/Returns blocks. The nested_name vs full_name section is the longest part but earns its space by citing a concrete failure mode (131 types named `State`, only 1 top-level). The 20,072 figure is illustrative padding that could be trimmed.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 7-param search tool with no output schema, the inline Returns block compensates well (ok/handle/total/returned/has_more/items with field names). What's missing is the session prerequisite and any explanation of `offset` / `exclude_compiler_generated`, leaving two knobs an agent must guess at.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description carries the burden, and it documents pattern, subtype_of, assembly, only_enums, and limit (including the 2000 ceiling that the schema does not state). Two of seven params are undocumented: `offset` and especially `exclude_compiler_generated`, whose non-obvious default of true interacts directly with the coroutine-body caveat the description raises.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb+resource set ("搜索游戏里的类、结构体、枚举") and positions itself as the primary entry point for mod development. The resource boundary versus search_fields, search_methods, and class_detail is obvious from the naming, and the read_query_result follow-up makes the tool's role in a two-step flow explicit.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives a clear when-to-use-which rule for the downstream step: use the returned `handle` with read_query_result for paging and re-filter inside results with its `pattern` param. It also gives a concrete anti-pattern warning (don't query by full_name). It never says when to prefer class_detail or search_fields over this tool, so an exclusion is missing.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_fieldsARead-onlyIdempotent
按名字搜索字段,返回所属类与字段类型。按字段名搜(定位「金币」「血量」这类目标的首选入口)。
total 是真实匹配总数(不受 limit 影响),配合 offset/limit 翻页。
owner 限定单个类;同名类跨程序集时会拒绝并给候选,可用 assembly= 消歧。
Args: pattern: 字段名子串(大小写不敏感)。 offset: 跳过前多少条(配合 total / has_more 翻页)。 limit: 本页最多返回多少条(上限 2000)。 owner: 限定在某一个类里搜。接受完整类名或短名,但短名必须唯一: 若命中多个同名类(常见于不同程序集),本工具会拒绝并返回 candidates,此时请改用完整类名或用 assembly 消歧。 为什么不猜:把两个无关类的字段混在一起返回,ok 仍是 true, 但算出来的偏移必然错,且要到运行时才暴露。 assembly: 程序集名子串,仅用于在 owner 命中多个类时消歧。
Returns:
{ok, handle, total, offset, limit, returned, has_more, items}
total 是真实匹配总数;若超过句柄上限会带 handle_truncated
与 handle_note(翻页请用本工具的 offset,不要依赖句柄拿全集)。
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| owner | No | ||
| offset | No | ||
| pattern | Yes | ||
| assembly | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover read-only/idempotent, and the description adds substantial extra behavior: `total` is the true match count unaffected by limit, paging is via offset/limit not the handle, oversized results carry handle_truncated/handle_note, and ambiguous owner matches fail with a candidate list instead of silently merging unrelated classes.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The first line front-loads purpose and the Args/Returns blocks are scannable, but the owner disambiguation is explained twice (once in the preamble, again in Args), and the 'why we don't guess' rationale, while useful, adds length.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 5-parameter read tool with no output schema, the description supplies the return shape ({ok, handle, total, offset, limit, returned, has_more, items}), paging semantics, and the truncation edge case, leaving nothing an agent needs missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description does all the work: it defines `pattern` as a case-insensitive name substring, `offset`/`limit` as paging (limit caps at 2000), `owner` as full or unique-short class name, and `assembly` as a disambiguator only relevant when owner matches multiple classes.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb+resource (search fields by name) and what is returned (owning class and field type). Explicitly positions itself as the preferred entry point when locating a field such as '金币' or '血量', which distinguishes it from the sibling class/method search tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives explicit when-to-use ('按字段名搜' first-choice entry), explains that `owner` scopes to a single class, and states that ambiguous short names are rejected with candidates, requiring `assembly=` or a fully qualified name to disambiguate. It even justifies the refusal policy rather than leaving the agent to discover it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_methodsARead-onlyIdempotent
按名字搜索方法,返回所属类、返回类型与 token。owner 语义与 search_fields 一致。
Args: pattern: 方法名子串(大小写不敏感)。 offset: 跳过前多少条(配合 total / has_more 翻页)。 limit: 本页最多返回多少条(上限 2000)。 owner: 限定在某一个类里搜,语义与 search_fields 一致 (短名必须唯一,否则拒绝并给 candidates)。 assembly: 程序集名子串,仅用于 owner 消歧。
Returns:
{ok, handle, total, offset, limit, returned, has_more, items}
total 是真实匹配总数。
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| owner | No | ||
| offset | No | ||
| pattern | Yes | ||
| assembly | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Beyond the annotations (readOnly/idempotent/non-destructive), the description adds real behavioral detail: a short owner name must be unique or the call is rejected with candidates, assembly is only for disambiguation, and limit is capped at 2000. It does not mention cost or auth, but the added rejection/uniqueness semantics are substantive.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loads the purpose and return shape, then a compact Args list, then the return envelope. Slightly redundant — the owner semantics are stated twice (once in the intro, once in Args) — but otherwise efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema exists, and the description compensates by spelling out the return envelope ({ok, handle, total, offset, limit, returned, has_more, items}) and clarifying that total is the true match count. Combined with full param coverage, it is nearly complete; only the numeric defaults are missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must carry the load, and it does: it defines pattern (case-insensitive substring), offset (skip count for paging), limit (page size, max 2000), owner (scoped, unique-short-name rule), and assembly. It omits the default values (limit=100, offset=0) present in the schema, a minor gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb+resource ("按名字搜索方法") and immediately lists what is returned (owning class, return type, token), so an agent knows exactly what the tool yields. It implicitly distinguishes itself from search_classes/search_fields via the method-name focus and the owner cross-reference, though it never names those siblings explicitly as alternatives.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives useful in-context guidance — offset pairs with total/has_more for paging, and assembly exists only for owner disambiguation — but it never says when to choose this over search_fields, search_classes, or find_hook_target. Usage is implied rather than stated against alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
set_field_valueADestructiveIdempotent
写对象字段值(read_field_value 的对称入口):自动查偏移、按类型定宽度与编码、写完回读核对。溢出直接报错不截断;引用类型字段拒绝(改引用属改逻辑,请用 eval_script/Hook)。
⚠️ 危险操作:写错地址或写错值会立刻让游戏崩溃或行为异常。
写之前务必先 read_field_value 读一次,确认偏移与当前值符合预期。
与 write_memory 的分工(不是重复工具):
write_memory 要「地址 + 裸十六进制字节」,是原始内存入口;
本工具要「哪个对象的哪个字段 + 一个语义化的值」,是字段入口。
它替你做了三件容易做错的事:查真实偏移、按字段类型定宽度、
按字段类型选整数/浮点/布尔的编码。
写几个字节由字段类型决定(与读取同一张表):bool 1、int16 2、
int32/float 4、long/double/引用类型 8。溢出直接报错,不静默截断 ——
把 300 写进 1 字节字段如果截成 44,你会看到 ok:true 却拿到没要的值。
引用类型字段(class/string/数组)会被拒绝:field_type 认不出基础类型
且宽度为 8 时,本工具报错而不是去写一个指针 —— 换对象引用属于改逻辑,
应该用 eval_script 或 Hook,而不是改一个字段的字节。
静态字段:把 instance 传成 "static"(或空串)即可写静态字段
(与 read_field_value 同一套约定)。静态字段走探针的
*_field_static_set_value,没有「实例 + 偏移」这回事;返回里 is_static
为 true、并给出 declared_by(它可能声明在基类上)。
⚠️ 静态字段常被全局逻辑读取,改了会影响整个游戏——返回里带
value_before,出问题可以用它写回。
Args:
instance: 对象指针(十六进制)。可用 find_instances 拿,
或从 Hook 事件的 args[0] 拿。
传 "static" 表示写静态字段(不需要对象指针)。
name: 类名。
field: 字段名。
value: 要写入的值。整数按字段宽度与符号解释;浮点字段给数字;
bool 字段给 true/false/1/0;认不出类型时给 0x... 字节串。
namespace: 命名空间。
image: 程序集名。
verify: 写完后立刻回读一次并放进返回(默认 True)。
这是为了不留「假成功」:写完把实测值给你,而不是只报 ok。
Returns: {ok, class, field, instance, offset, field_address, wrote_hex, write_width, write_kind, value_before?, read_back?...}
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| field | Yes | ||
| image | No | ||
| value | Yes | ||
| verify | No | ||
| instance | Yes | ||
| namespace | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already mark this as destructive and non-read-only, but the description adds substantial context beyond them: overflow errors instead of truncation, rejection of reference-type fields, read-back verification, static-field behavior, and value_before rollback information. It also warns clearly that incorrect addresses or values can crash the game.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with purpose and danger warnings, and the sectioning makes it easy to scan. It is appropriately detailed for a destructive seven-parameter tool, though some static/verify details are repeated between the body and the Args section and could be tightened slightly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the destructive mutation behavior, zero schema description coverage, and no output schema, the description is complete enough for safe invocation. It documents return fields, verification behavior, refusal cases, and the static-field special path.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must carry parameter meaning, and it does so for all seven parameters. It explains instance as a hex pointer or "static", value encoding by field type, verify as read-back verification, and what name/field/namespace/image refer to.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource: writes an object field value, and explicitly frames itself as the symmetric entry point to read_field_value. It also distinguishes itself from write_memory and eval_script/Hook, so an agent can identify the correct tool without opening sibling schemas.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives explicit usage rules: read the field first with read_field_value, use write_memory for raw address+bytes, use eval_script/Hook for reference replacement, and pass "static" to target static fields. It also names when the tool will refuse a write, which is unusually actionable.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ue_list_entriesARead-onlyIdempotent
列出 .pak / .utoc 里打包了哪些资产(可按名字过滤、翻页)。返回 returned/has_more;翻页空页会说明是哪一种「空」。
这是 UE 游戏上最实用的一步:想知道「这游戏有哪些资源、 本地化文本在哪个文件里」,就靠它。
Args: container: .pak 或 .utoc 文件路径。 kind: auto / pak / utoc。默认按扩展名自动判断。 pattern: 名字子串过滤(大小写不敏感)。 limit: 最多返回多少条。 offset: 从第几条开始(配合 total 翻页)。
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | auto | |
| limit | No | ||
| offset | No | ||
| pattern | No | ||
| container | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly/idempotent/non-destructive, so the safety profile needs no restating. The description does add that results carry `returned`/`has_more` and that an empty page explains which kind of 'empty' occurred, but that last point is vague and nothing is said about limits, scale, or cost on large archives.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Purpose, return fields, and the motivating scenario are front-loaded before the Args block, so the agent gets the essentials first. The '这是 UE 游戏上最实用的一步' line is partly promotional but doubles as usage framing, so it mostly earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema and zero schema-level parameter descriptions, the description covers the needed ground: what is listed, how to filter/page, and the shape of the paging response. A reader can call it correctly without opening the schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the Args block is doing the real work: all five parameters are explained, including kind's auto/pak/utoc values (absent from the schema), pattern's case-insensitivity, and offset's paging role. Minor gaps remain — no max value for limit, and it references a `total` field not otherwise described.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource: list which assets are packed inside a .pak/.utoc container, with filtering and paging. An agent can immediately tell this is an archive-listing tool. It does not, however, distinguish itself from nearby siblings such as ue_manifest or ue_profile, which plausibly overlap.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives an explicit use case ('想知道这游戏有哪些资源、本地化文本在哪个文件里, 就靠它'), which tells the agent the triggering question well. It stops short of exclusions — there is no statement of when to prefer ue_manifest or another sibling instead.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ue_manifestARead-onlyIdempotent
读取 UE 的打包清单 Manifest_*Files*.txt。支持 offset/limit 并有 has_more。
清单是打包时生成的「应该有哪些文件」的真值, 常用来校验从 pak/utoc 解析出的文件清单是否正确。
Args:
path: 清单文件路径。留空则自动在 game_dir 里找。
game_dir: 游戏安装目录(path 留空时用)。
pattern: 路径子串过滤。
offset: 从第几条开始(翻页用)。
limit: 本页最多多少条。被截断时 has_more 为 true。
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| limit | No | ||
| offset | No | ||
| pattern | No | ||
| game_dir | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly/idempotent/non-destructive, so the description only needs to add context and it does: auto-discovery of the manifest when `path` is empty, pagination via offset/limit, and the truncation signal `has_more`. It says nothing about behavior when no manifest is found, which is the main remaining gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The purpose and its validation use case are front-loaded, followed by a compact Args block where each line adds information. It is slightly longer than needed because the preamble and the Args section partly restate the same concepts.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a read-only, five-parameter tool with no output schema, the description covers discovery, filtering, and pagination well enough to call it correctly. What it omits is the shape of the result (e.g. whether it returns paths plus counts) and failure behavior, which an agent would want given there is no output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must carry all five parameters – and it does, explaining that an empty `path` triggers auto-discovery, that `game_dir` is only used in that case, that `pattern` is a path-substring filter, and that offset/limit are paging controls. This fully compensates for the empty schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource (read the UE packaging manifest `Manifest_*Files*.txt`) and explains its role as the ground truth of which files should exist. It never names a sibling, but the pak/utoc validation framing implicitly separates it from the other `ue_*` tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives a clear use case – verifying file lists parsed out of pak/utoc – which tells the agent when to reach for this tool. There is no explicit when-not guidance or named alternative (e.g. `ue_list_entries`), so it stops short of full routing guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ue_profileAIdempotent
UE 游戏概况:容器、清单、脚本模块。汇总一个 Unreal 游戏的可提取信息(资源容器、清单、脚本对象)。
包含每个 .pak/.utoc 的文件数、目录数、以及条目样例。 全量条目可能非常大(实测某样本 18,956 条 → JSON 15.8 MB), 所以默认只给样例与计数;要完整清单用 ue_list_entries。
Args: exe: 游戏可执行文件路径。留空则用当前会话的主程序。 output_path: 可选,把完整 profile 写成 JSON 文件的路径。
| Name | Required | Description | Default |
|---|---|---|---|
| exe | No | ||
| output_path | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The annotations already declare idempotent=true, destructive=false, and readOnly=false. The description adds useful context beyond them: the deliberate size-capping behavior (default sample-only) with a concrete measured example (18,956 entries → 15.8 MB), and the fact that a full profile can be written to a file via output_path. That explains the non-read-only annotation rather than contradicting it.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is short and front-loaded: it states what the tool gathers first, then the size constraint and the alternative, and finally the arguments. The bolded header fragment is minor formatting noise, but every sentence adds real information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
There is no output schema, but the description compensates by saying what is returned (per .pak/.utoc file and directory counts plus sample entries) and warns about output size. For a 2-parameter, non-destructive extraction tool this is nearly complete; only the exact return envelope is left implicit.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 0% description coverage, so the description carries the full burden, and it does document both parameters: exe (path to the game executable, empty means the current session's main program) and output_path (optional path for writing the full profile JSON). This is above baseline because it resolves the otherwise opaque empty-string defaults, though it does not specify accepted path formats or the output file's content.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a specific verb+resource pair: it summarizes extractable information (asset containers, manifest, script objects) from an Unreal game, and it lists the concrete per-container data returned (file counts, directory counts, sample entries). It also distinguishes the tool from the sibling ue_list_entries, which returns the full listing, so an agent can choose between them without opening either schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It clearly states when to use this tool rather than the alternative: by default it returns only samples and counts, and if you want the complete listing you should use ue_list_entries. It does not cover other plausible siblings such as ue_manifest or ue_script_objects, and it gives no prerequisites, but the main routing decision is explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ue_script_objectsARead-onlyIdempotent
从 UE 游戏 exe 里提取 /Script/ 模块名与对象路径。失败时按契约给 ok=false + error。
这是字符串证据,不是反射元数据:能告诉你游戏大致有哪些系统 (如 /Script/Engine、/Script/GameplayAbilities), 但拿不到父类链和属性偏移——那需要运行时。
Args: exe: 游戏可执行文件路径。留空则用当前会话的主程序。 limit: 每类最多返回多少条。
| Name | Required | Description | Default |
|---|---|---|---|
| exe | No | ||
| limit | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description adds genuinely new context: the failure contract (ok=false + error) and the fact that results are string evidence rather than reflection metadata, but it does not describe result shape or how strings are grouped beyond '每类'.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with the purpose, then the key limitation, then the args; each block earns its place. The bold emphasis and mixed prose/Args formatting are slightly heavier than necessary but not wasteful.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description covers the return domain (/Script/ module names and object paths) and the error contract, plus the key caveat about missing class/field metadata. It stops short of describing the actual result structure or whether results are deduplicated across modules.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description must carry the parameters, and it does: exe is the game executable path with the non-obvious fallback to the current session's main program, and limit is the per-category cap. It does not state what a 'category' is or what limit applies to more precisely.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource: extract /Script/ module names and object paths from a UE game exe. It is contrasted with runtime reflection tools (no parent chains or property offsets), which separates it from siblings like runtime_class_info, though that sibling is not named explicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives a clear exclusion: it cannot provide parent class chains or property offsets because those require runtime, so an agent knows when to pick a runtime sibling instead. The alternative is described but not named, and no explicit 'use this when' positive trigger is given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
unhookADestructiveIdempotent
卸载 Hook。hook_id 留空则卸载全部。
卸载后游戏行为恢复原状。收尾时务必调用(或用 close_session)。
| Name | Required | Description | Default |
|---|---|---|---|
| hook_id | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare destructiveHint=true, idempotentHint=true and openWorldHint=true, so the safety profile is covered. The description adds value beyond that: the effect ('卸载后游戏行为恢复原状' – game behavior reverts) and the scope rule that an empty hook_id unhooks everything.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three short sentences, each front-loaded with a distinct fact: what it does, the empty-id scope rule, and the cleanup obligation. Nothing is redundant.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-parameter destructive tool whose annotations already cover safety and idempotency, the description supplies scope, effect, and timing. Only the return/response shape is unaddressed, a minor gap given no output schema exists.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description must carry the parameter. It does the essential work: 'hook_id 留空则卸载全部' explains that the optional param's empty/default value triggers a full unhook, which the bare schema (default: "") does not convey.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb+resource: '卸载 Hook' (uninstall a hook), the clear inverse of hook_method/hook_address in the sibling set. An agent can tell it apart without opening the schema. It stops short of explicitly naming the install siblings, but the cleanup framing makes intent unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly says when to use it ('收尾时务必调用' – must call at teardown) and names an alternative ('或用 close_session'). It does not clarify the relationship between unhook-all and close_session (whether the latter already unhooks), leaving a small ambiguity.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
verify_stateAIdempotent
出一份可证伪的验收结论:每条断言独立求值,并要求足够多的独立证据才判成立。
为什么必须有它(这是从 reverse-skill 的证据链契约学来的一条硬规则)
单条证据不得静默提升为「已验证」。它那条契约的原文是:
validated需要 >=2 independent Evidence(最好 1 静态 + 1 动态); 单条证据不得静默提升为 validated。
我们自己的实战正好印证了这条:在 CatapultHero 验收 Mod 时,
我同时看了日志(已修改 精核 = 108)与屏幕 OCR(精核:108)——
两个互相独立的来源给出同一个结论,才敢说「Mod 真的生效了」。
只看日志的话,日志本身是 Mod 打的,Mod 写错了照样打日志。
所以本工具把「要几条独立证据」变成显式参数,而不是留给 Agent 的直觉。
参数 checks 怎么传
逗号分隔的条目,每条形如 kind=参数,与 wait_for 共用同一套条件语义
(_eval_condition,所以两处结论必然一致):
写法 | 含义 |
| 日志里有匹配行(只读不消费) |
| 屏幕上 OCR 到该文本 |
| 存在该窗口 |
| 该字段当前等于期望值 |
| 该类活实例数达到下限 |
示例(双证据验收 Mod 生效):
verify_state(checks="log=D:\\Game\\UE4SS.log#已修改 精核,"
"ocr=精核")返回
· verdict —— pass / fail / unverifiable(三态,与 wait_for 同源)
pass要求:成立条数 >= require_independent,且这些成立的条目 来自 >= require_independent 条不同的信号通道全部条件都成立但只有 1 条 → 判
fail并说明「证据不足」, 不是 pass —— 这正是「单条证据不得静默提升」多条成立但全是同一条通道(如两条
ocr=)→ 同样判fail, 并说明「同源,缺独立第 2 通道」—— 同一张截图上的两条断言会一起 对、也会一起错,不是「互相独立」的证据 ·evidence—— 每条断言各自的{check, hit, detail}·independent_count—— 成立的不同通道数(按 kind 去重), 与passed(成立的条数)不同;independent_kinds列出是哪几种 ·require_independent/verdict_reason—— 门槛值与判定理由
Args:
checks: 逗号分隔的断言列表,见上表。
require_independent: 判 pass 所需的成立条数下限(默认 2)。
设 1 会退化成「单条证据即通过」—— 只在确实只有一个可靠来源时用。
Returns: {ok, verdict, verdict_reason, evidence, independent_count, require_independent, passed, unverifiable_count}
| Name | Required | Description | Default |
|---|---|---|---|
| checks | Yes | ||
| require_independent | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations only give readOnlyHint=false, idempotentHint=true, destructiveHint=false, openWorldHint=true; the description goes well past that by explaining the pass/fail/unverifiable tri-state, the rule that a single channel can never silently become `pass`, and that same-channel duplicates are deliberately failed as non-independent. That is exactly the decision logic an agent needs and cannot get from annotations. It stops short of covering practical behavior such as what happens when a log path is missing or whether OCR capture itself has side effects, and the per-check claim that log reads are '只读不消费' sits in mild tension with readOnlyHint=false — not a direct contradiction, but unaddressed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The purpose is front-loaded in the first sentence and the parameter table is well-structured, but the description is padded with a long doctrinal rationale, a quoted external 'contract', and an extended anecdote about verifying a CatapultHero mod. The core operational facts (parameter syntax, verdict rules, return fields) would fit in roughly half the space, and the anecdote earns its place only as motivation.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With only two parameters, no output schema, and thin annotations, the description supplies everything an agent needs: argument syntax for every check kind, the default and meaning of the threshold, the exact pass criterion, the independence/同源 failure rule, and a field-by-field account of the return object. Return values are described inline precisely because no output schema exists, which is the correct division of labor.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% and both parameters are bare (`checks` string, `require_independent` integer), so the description carries the full burden and does so with a five-row syntax table covering log/ocr/window/field/instances formats plus a concrete composed example. It also documents `require_independent`'s default of 2, what the value counts, and the consequence of lowering it to 1. This is complete compensation for a description-free schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The opening line states a specific verb and outcome: evaluate each assertion independently and require enough independent evidence before returning a verdict. It also ties itself to `wait_for` by declaring shared condition semantics and a shared three-state verdict, which helps an agent place it among the sibling tools. It never states plainly that it is the non-blocking counterpart to `wait_for`, so the differentiation from that sibling remains implicit.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The rationale section and the worked Mod example give a clear picture of when this tool is the right choice: situations needing a falsifiable acceptance verdict with at least two independent channels. The `require_independent=1` escape hatch is scoped with a caveat ('only when there truly is just one reliable source'). There is no explicit when-not statement and no direct comparison to `wait_for`, so it lands at a clear 4 rather than a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
wait_forAIdempotent
轮询等待条件成立并给出证据包(验收闭环里「等到可以判了」那一步)。五种条件:field / instances / ocr / log / window。返回三态 verdict(pass / fail / unverifiable —— 把「没法判」与「没通过」严格区分)+ polls / evidence;超时如实报 fail,不静默当通过。注意 kind="log" 等的是新增(先记基线再等增量),不是「当前存在」。
为什么必须有它:游戏是异步的 —— 点完按钮要等界面出来、场景加载要
等几秒。不等待就直接断言,会得到大量假失败(其实只是还没加载完)。
同类工具(MaaFramework)把它写成一句伪代码:
while(!hit && !timeout) { 检查; sleep(rate_limit); }。
支持的条件(kind)覆盖三类信号,优先用引擎信号,少用像素:
kind | 判据 | 需要哪些参数 |
| 某字段的值等于 |
|
| 某类的活实例数 ≥ |
|
| 屏幕上 OCR 到 |
|
| 日志里新增匹配 |
|
| 出现标题含 |
|
kind='log' 等的是「新增」,不是「存在」(这条是真机实战踩出来的):
第一次轮询会记下基线匹配数,之后超过基线才算成立。
否则旧日志里早就有的匹配行会让它在 1ms 内返回 pass,
而本次操作根本没发生(实测:日志里已有 5 条「已修改 精核」时确实如此)。
要判「当前是否已有」请直接用 probe_log,不要用 wait_for。
返回值就是证据包(不是光秃秃的布尔):
· ok —— 条件成立了
· verdict —— pass / fail / unverifiable 三态。
unverifiable 表示「没法判」(例如依赖不可用、探针不上线),
与 fail(判了、没成立)严格区分 —— 把「没法判」说成「没通过」
会让 Agent 去修一个根本不存在的缺陷。超时如实报 fail。
· polls / elapsed_ms / interval_ms —— 轮询了几次、花了多久
· evidence —— 每次轮询的实测值(最后若干次),可核查
· hint —— 超时时给出下一步建议
Args:
kind: 上面五种之一。
target: ocr / window 的目标文本。
region: ocr 用:"x,y,w,h" 屏幕绝对坐标。
window: ocr 用:窗口标题子串。
name/namespace/image: field / instances 的类定位参数。
field: field 用:字段名。
equals: field 用:期望值(按字段类型比较)。
pattern: log 用:日志正则。必须同时给 target(日志路径)。
timeout_ms: 总超时(默认 20000)。
interval_ms: 轮询间隔(默认 500)。别设太小 —— 徒增开销。
min_count: instances 用的实例数下限(默认 1)。
Returns: {ok, verdict, kind, polls, elapsed_ms, evidence, last, hint?}
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| name | No | ||
| field | No | ||
| image | No | ||
| equals | No | ||
| region | No | ||
| target | No | ||
| window | No | ||
| pattern | No | ||
| min_count | No | ||
| namespace | No | ||
| timeout_ms | No | ||
| interval_ms | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Goes well beyond the annotations, which only declare idempotent/non-destructive/openWorld. The description discloses polling cadence and defaults, the three-state verdict and why `unverifiable` is distinct from `fail`, the guarantee that a timeout reports fail rather than silently passing, and the baseline-then-increment semantics of `kind=log` — a real behavioral trap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The core purpose is front-loaded in bold and the table is an efficient structure. Some material is expendable — the MaaFramework pseudocode quote and the repeated explanation of the log baseline (once in the table, once in its own bold paragraph) cost space without adding decisions.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 13-param, no-output-schema polling tool, everything an agent needs is present: condition kinds, per-kind params, return shape, tri-state semantics, timeout behavior, and the failure mode that motivates the tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description carries the entire burden, and it does: each `kind` is mapped to its required parameters, per-param meaning is given (`region` as "x,y,w,h" absolute coords, `pattern` as regex requiring `target`), and defaults for timeout/interval/min_count are stated. It stops short of documenting every one of the 13 params exhaustively (e.g. `namespace`/`image` are only grouped under class-location), which keeps it at 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The opening line states a specific verb and resource ("poll-wait for a condition to hold, return an evidence bundle") and names the pipeline step it serves. The kind table makes the five condition types concrete, and the text explicitly distinguishes it from sibling tools `probe_log` and `verify_state`.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states when to use (async waits after button clicks, scene loads) and when not to (use `probe_log` to test whether something already exists, not `wait_for`). It also gives a cross-cutting selection rule: prefer engine signals over pixel/OCR signals.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
write_memoryADestructiveIdempotent
写游戏进程内存。
⚠️ 危险操作:写错地址会立刻崩溃游戏。 写之前务必先用 read_memory 确认地址内容符合预期。 建议只改浮点数/整数这类简单值,并先备份原值。
不要写已装 Hook 的函数入口:Frida 的 Interceptor 拥有那几字节
(它在那里写了跳转指令),绕过它直接 Memory.protect + 写同一块内存,
哪怕写回刚读到的同样字节,也会在数秒内让游戏崩溃 ——
实测两次:Windows 事件日志里是 GameAssembly.dll 在该方法 RVA 处的
0xc0000005;同样操作写在模块头(base)上则完全无害且能原样读回。
本工具默认拒绝这种写入;确实要写请传 force=True,
或者先 unhook 再写。
Args: address: 地址(十六进制)。 hex_data: 要写入的字节,十六进制串(如 "0000803f" 表示 float 1.0)。 force: 明知目标被 Hook 覆盖仍要写(默认 False = 拒绝)。
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | ||
| address | Yes | ||
| hex_data | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already flag destructiveHint=true, but the description adds the non-obvious behavior an agent could never infer: default rejection of writes over hooked function entries, the crash mechanism behind it, and the fact that even identical bytes cause a crash in that case. It also discloses acceptable targets (module headers) and the force override semantics.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with the danger, then prerequisites, then the hook rule, then args – a sensible order with no wasted framing. The retrospective detailing (Windows event log, 'c0000005', 'tested twice') is more narration than an agent needs, though it does substantiate the rule.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a dangerous 3-parameter mutation with no output schema and thin annotations, the description covers risk, prerequisites, refusal semantics and per-param encoding. It never states what a successful call returns (e.g. new bytes or a status), which is the one gap an agent might notice.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, but the args section documents all three parameters: address is hexadecimal, hex_data is a hex string with a concrete encoding example ('0000803f' = float 1.0), and force is an opt-in override whose default false means refuse. This fully compensates for the absent schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource: writing raw bytes into a game process's memory, which is clearly distinct from reading or hooking. It does not explicitly say how it differs from set_field_value, the sibling that presumably writes values at a typed/higher level, so the boundary needs inference.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives explicit when-to-use and prerequisite steps (verify the address with read_memory first, back up the original value, prefer simple float/int payloads) and an explicit refusal case with two documented escapes (force=True or unhook first). The agent knows exactly what to do before and instead of calling this.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
45 tool updates
v1.0.0- First observed
analyze_dependency - First observed
capture_screen - First observed
class_detail - First observed
class_hierarchy - First observed
close_session - First observed
decompile - First observed
detect_ue - First observed
drain_events - First observed
eval_script - First observed
find_derived_classes - First observed
find_game_processes - First observed
find_hook_target - First observed
find_instances - First observed
gc_control - First observed
get_diagnostics - First observed
get_session - First observed
hook_address - First observed
hook_method - First observed
hook_status - First observed
inject_process - First observed
inspect_binary - First observed
inspect_game - First observed
launch_game - First observed
list_images - First observed
ocr - First observed
open_game - First observed
probe_log - First observed
read_field_value - First observed
read_memory - First observed
read_query_result - First observed
runtime_class_info - First observed
runtime_info - First observed
scan_pattern - First observed
search_classes - First observed
search_fields - First observed
search_methods - First observed
set_field_value - First observed
ue_list_entries - First observed
ue_manifest - First observed
ue_profile - First observed
ue_script_objects - First observed
unhook - First observed
verify_state - First observed
wait_for - First observed
write_memory
TDQS
Scored across 45 tools
Most tools target clearly distinct stages (static metadata, runtime inspection, hooking, memory/field access, verification), and descriptions explicitly distinguish close pairs like read_memory vs read_field_value and write_memory vs set_field_value. A few boundaries remain fuzzy, especially inspect_game vs detect_ue vs ue_profile, and class_hierarchy(down) vs find_derived_classes, but the descriptions provide enough guidance to choose correctly.
The set is consistently snake_case and mostly follows verb_noun or noun_action patterns (search_classes, hook_method, read_field_value, verify_state). A handful of bare nouns and imperatives (class_detail, decompile, unhook, ocr, wait_for) break the pattern slightly but remain readable and predictable.
At 45 tools, the surface is heavy for a single MCP server even given the broad game-modding and multi-engine scope. Many tools are individually justified, but the overall count raises selection cost and makes overlap more likely; a more tightly grouped interface would be easier to use.
Coverage is broad across static indexing, runtime inspection, hooking, memory/field mutation, UE asset inspection, OCR/log verification, and session lifecycle. The main gaps are input automation (OCR returns click points but no click/keypress tool) and full IL2CPP decompilation, which agents may need to work around.
Maintenance
Related MCP Connectors
Agent MCP: 65 tools — 5-chain verification, risk, prediction & crypto trends, 17 web tools.
Agent MCP: 65 tools — 5-chain verification, risk, prediction & crypto trends, 17 web tools.
Discover, inspect and run 63,000+ agent tools from one balance. Pay per call, no subscriptions.
A registry of AI agent tools — MCP servers, APIs, CLIs, SDKs — kept current by automated ingestion.
Related MCP Servers
- AlicenseAqualityFmaintenanceProvides Cheat Engine-like capabilities for game hacking and reverse engineering through Frida, enabling memory scanning, value modification, pattern matching, function hooking, and code injection across processes.4285MIT
- AlicenseBqualityCmaintenanceA comprehensive MCP server that exposes Frida's dynamic instrumentation toolkit to AI agents for process management, script injection, and memory operations. It provides over 50 tools to interact with local and mobile devices, enabling advanced capabilities like function hooking and memory analysis.55MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to analyze and manipulate Unity IL2CPP applications via Frida, supporting disassembly, class/method listing, and heap analysis.31MIT
- AlicenseCqualityBmaintenanceEnables an AI agent to auto-detect a game's engine (Unity, Unreal, Godot, Java, or native) from its files and then inspect, search, and patch the underlying binaries with in-process PE analysis, hex editing, pattern scanning, string extraction, checksums, diffing, and disassembly. Everything runs locally and offline with no cloud dependency or telemetry.10064 npm5MIT