Skip to main content
Glama

runtime_assert

Read-onlyIdempotent

Validate live Godot game state by asserting node properties, scene structure, on-screen text, performance baselines, and screenshot differences during runtime.

Instructions

运行时断言:在运行中的游戏上验证节点状态/场景结构/屏幕文本/性能/截图对比。agent 可任意时刻调用,不必走 workflow.dev_loop。全部依赖 game-bridge(需先 game_bridge_install + 游戏运行中)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNonode_state: 节点路径(如 /root/Main/Player)
textNoscreen_text: 要查找的文本
nodesNoscene_structure: 期望的节点列表
actionYes断言类型
expectNonode_state: 期望的属性键值对(如 {"health": 100, "position": {"x": 0}})
presentNoscreen_text: true=断言文本存在(默认),false=断言不存在
baselineNoperf: 期望的性能基线(如 {"fps": 60})
referenceNoscreenshot_diff: 参考截图路径(res://、项目相对或绝对路径;须在白名单内)
thresholdNoscreenshot_diff: 像素差异容忍阈值(0-1,默认 0.12)。per-pixel 归一化 RGB 距离严格大于此值才计为差异像素;值越小越严格
toleranceNonode_state/perf: 数值容差(默认 0,精确匹配)
project_pathNo项目路径(screenshot_diff 必填:解析 user:// 截图落盘位置)
max_diff_ratioNoscreenshot_diff: 允许的差异像素占比上限(0-1,默认 0.05)。严格像素回归传 0;常规视觉回归建议以同布局好图对校准(本仓实测同布局好图对 ≈0.176,勿低于该量级)
Behavior4/5

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

注解已声明 readOnlyHint=true、idempotentHint=true、destructiveHint=false,描述有需要补充的只是运行依赖和前置条件,该描述确实补充了 game-bridge、安装步骤和游戏运行要求。这些信息对调用时机和准确使用有价值,且没有注解矛盾。

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

Conciseness5/5

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

描述紧凑,两句话即完成:先给功能摘要,再给调用时机和前置条件,没有冗余或重复 schema 内容。每句话的信息密度都足够,结构便于 agent 快速理解。

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

Completeness4/5

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

该工具复杂度中等偏高:5 种 action、12 个参数、嵌套对象且无输出 schema。描述已覆盖调用范围、路径边界和依赖前提,sctype+annotations 也清晰;唯一明显缺口是未说明断言失败时的返回形式或行为,但整体仍足以支持 agent 正确发起调用。

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

信号显示 schema 参数描述覆盖率为 100%,12 个参数已包含较充分的字段级说明,包括 action 枚举、screenshot_diff 的 threshold/max_diff_ratio 语义等。描述对参数增加的意义不大,因此按高覆盖率基线给 3 分。

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

Purpose5/5

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

描述首句即明确‘运行时断言’这一动作,并列举可验证的各类对象:节点状态、场景结构、屏幕文本、性能、截图对比。它同时说明该工具的运行场景是‘运行中的游戏’,并能与 workflow.dev_loop、validation、screenshot 等同级工具区分开。

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

Usage Guidelines4/5

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

明确说明‘agent 可任意时刻调用,不必走 workflow.dev_loop’,并给出硬前置条件:需先 game_bridge_install 且游戏运行中。这些信息足够让 agent 判断何时使用该工具;但未明确说明何时不应使用或与 validation、qa 等工具的取舍边界,稍有缺失。

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wgt19861219/godot-mcp-enhanced'

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