Skip to main content
Glama

script

Destructive

Manage Godot GDScript files: read, write, edit, batch replace, generate tests, and execute code with safety checks.

Instructions

脚本操作。读写: read_script, write_script。编辑: edit_script(行号/search_and_replace)。执行: execute_gdscript(⚠️ 沙箱仅防误操作,不可用于不可信输入。高安全场景请用 ALLOW_EXECUTE_GDSCRIPT=false 或容器隔离)。测试: generate_test, create_test_scene。批量替换: project_replace。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeNoexecute_gdscript: 要执行的 GDScript 代码
actionYes操作类型
searchNoproject_replace: 搜索文本
contentNowrite_script: GDScript 内容
dry_runNoproject_replace: 仅预览不写入(默认 false)
replaceNoproject_replace: 替换文本
timeoutNoexecute_gdscript: 超时秒数(默认 30)
end_lineNoedit_script: 替换结束行(1-based,含)
overwriteNowrite_script: 覆盖已有文件(默认 false)
extensionsNoproject_replace: 文件扩展名(默认 [".gd"])
godot_pathNo覆盖 Godot 二进制路径(可选,优先于项目配置和环境变量)
start_lineNoedit_script: 替换起始行(1-based)
indent_modeNoedit_script: 缩进模式(默认 raw)raw
new_contentNoedit_script: 替换内容
script_pathNoread_script 用绝对路径;write_script/edit_script/generate_test 用绝对或相对项目路径
exclude_dirsNoproject_replace: 排除目录(默认 [".godot", ".import"])
project_pathNoGodot 项目目录路径(可选,默认使用 GODOT_PROJECT_PATH 环境变量或当前目录)
auto_validateNoedit_script: 自动验证语法并在失败时回滚(默认 true)
load_autoloadsNoexecute_gdscript: 省略时自动检测 autoload 引用;显式 true/false 覆盖自动检测
verify_contentNoedit_script: 期望内容守卫(不匹配则中止)
search_and_replaceNoedit_script: 内容搜索替换模式(提供时忽略 start_line/end_line)
Behavior4/5

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

Beyond the annotations (destructiveHint=true), the description discloses that the execute_gdscript sandbox only prevents accidental operations, not untrusted input, and suggests mitigation measures. This is valuable behavioral context that goes beyond the structured hints.

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

Conciseness4/5

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

The description is compact and front-loaded with the main purpose, packing all sub-actions and a safety warning into one efficient paragraph. The use of punctuation makes it slightly dense, but every clause adds distinct information.

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

Completeness3/5

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

For a tool with 21 parameters and no output schema, the description gives a solid operational overview and a critical security warning, but it omits details about return values, error behavior, or what each action outputs. This is a noticeable gap given the tool's complexity.

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

Parameters3/5

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

The schema has 100% description coverage for all 21 parameters, so the description doesn't need to repeat parameter meanings. It adds a small semantic layer by grouping parameters with actions (e.g., edit_script uses line numbers or search_and_replace), but this is already clear from the schema.

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

Purpose4/5

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

The description clearly states that this is a script operations tool and enumerates all sub-actions (read/write, edit, execute, test, batch replace), making its role as a dispatcher obvious. It distinguishes these operations internally, though it doesn't contrast with external sibling tools.

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

Usage Guidelines4/5

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

The description provides an explicit map of when to use each sub-action (e.g., read_script for reading, edit_script for editing). It also gives specific security guidance for execute_gdscript, recommending ALLOW_EXECUTE_GDSCRIPT=false or container isolation for high-security scenarios. However, it doesn't explicitly compare against sibling tools.

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