Skip to main content
Glama

attach_script

Attach compatible GDScript or C# scripts to scene nodes, executing project constructors and refusing unavailable scripts before saving; C# needs Godot .NET and a built assembly.

Instructions

Attach a compatible GDScript or C# script to a scene node. Executes project constructors; refuses unavailable scripts before saving. C# requires Godot .NET and a built assembly.

Input Schema

NameRequiredDescriptionDefault
nodePathYes
scenePathYes
scriptPathYes
projectPathYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A3.5/5.0
Behavior4/5

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

Adds real behavior beyond the annotations: it executes project constructors (an unadvertised side effect), validates and refuses unavailable scripts *before saving* (so failure is non-destructive/atomic), and states the .NET build prerequisite. Annotations only cover the generic read/destructive/open-world profile, so this extra context is genuinely valuable. It still omits whether an existing attachment is replaced or an error is raised.

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?

Three short sentences, front-loaded with the action, then side effects, then the C# caveat. Nothing is padded or repeated.

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 four-required-parameter mutation with no output schema and only generic annotations, the description covers side effects and failure mode well but leaves parameter meaning and the result of a successful attach (does it return the node, the resource, nothing?) entirely unaddressed.

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

Parameters2/5

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

All four parameters (projectPath, scenePath, nodePath, scriptPath) have zero schema description coverage, and the description explains none of them — not even the distinction between the target node path and the script path, or whether paths are absolute or project-relative. The self-describing names carry all the weight here.

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?

Specific verb ('Attach') plus resource ('compatible GDScript or C# script') and target ('scene node'), which clearly separates it from siblings like set_node_properties or modify_scene. It stops short of naming which sibling to use for related script work, 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 Guidelines3/5

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

The description gives preconditions ('C# requires Godot .NET and a built assembly', 'refuses unavailable scripts') that imply when this call will fail, but never states when to choose this over alternatives such as modify_scene or set_node_reference. Usage is implied rather than directed.

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