Skip to main content
Glama

attach_script

Attach an existing GDScript file to a specific node in a Godot scene by providing project, scene, node, and script paths.

Instructions

Attach an existing GDScript to a node in a scene

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodePathYesNode path like root/Player
scenePathYesScene file relative to project
scriptPathYesScript path relative to project, e.g. scripts/player.gd
projectPathYesPath to the Godot project directory

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It says nothing about what happens if the node already has a script (overwrite? error?), whether the scene must be saved/reloaded, permission requirements, or the return behavior — significant gaps for a mutation tool.

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?

A single, front-loaded sentence with the verb first and no filler. It is efficient, though arguably under-specified rather than concise.

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 4-required-parameter mutation tool with no annotations and no output schema, the one-line description leaves behavioral questions unanswered, but the fully documented schema covers the calling mechanics. Adequate at minimum, with clear gaps around overwrite/error semantics.

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

Parameters3/5

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

Schema description coverage is 100% and every parameter is documented inline (nodePath, scenePath, scriptPath, projectPath), so the schema does the heavy lifting. The description adds only the implicit linkage that scriptPath should point to an existing script, which is baseline-level value.

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

Purpose4/5

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

The description states a specific verb (Attach), resource (GDScript), and target (a node in a scene), which cleanly distinguishes it from siblings like create_script or set_node_property. It stops short of naming any sibling explicitly, but the operation is unambiguous.

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

Usage Guidelines2/5

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

The word 'existing' weakly implies you must have a script already (contrasting with create_script), but there is no explicit when-to-use, when-not-to-use, or named alternative. An agent is left to infer the workflow (create_script → attach_script) on its own.

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