Skip to main content
Glama

godot_attach_script

Attach or detach GDScripts to nodes to control game logic, with optional initial property values for immediate setup.

Instructions

Attach or detach a GDScript to/from an active node.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

Annotations already indicate this is a mutating tool (readOnlyHint=false), so the description's relationship to that is consistent. The description adds 'active node' and 'GDScript' context but does not disclose what happens if a script is already attached, whether attaching replaces the existing script, or that the operation is not idempotent. It 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.

Conciseness5/5

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

A single, efficient sentence states the entire scope of the operation without fluff. Every word in 'Attach or detach a GDScript to/from an active node' earns its place, and it is immediately front-loaded.

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?

The definition is largely complete for a simple two-mode action, especially because the annotations and schema cover safety, read-only vs mutating, and parameter semantics. The main gap is not providing a caveat about non-idempotent behavior or what happens when a node already has a script, but this is a minor issue for this operation.

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 description itself contributes no additional parameter guidance beyond the schema. However, the input schema's nested property descriptions do explain that node_path is the target node, script_path null or empty detaches, and initial_properties sets export values after attachment. Since the schema already carries the semantic weight, a baseline of 3 is appropriate.

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?

The description uses a specific verb ('Attach or detach') and identifies the resource ('a GDScript') and target ('an active node'), distinguishing it from sibling tools like create_script, validate_script, or get_node_script_info. Even though the tool name only mentions 'attach', the description clearly expands the scope to also cover detachment.

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 usage context is implied: you use this when you need to associate or disassociate a GDScript from an active scene node. However, the description gives no explicit guidance on when not to use it, no prerequisites, and does not point to related tools such as godot_create_script or godot_validate_script for creating or checking scripts first.

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/mcintalmo/godot-engine-mcp'

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