Skip to main content
Glama

Write GDScript File

godot_write_script
Idempotent

Create or update GDScript files in Godot 4 projects by writing source code to specified paths within the editor's resource system.

Instructions

Writes (creates or overwrites) a GDScript file at the given path.

Args:

  • file_path (string): res:// path e.g. "res://player/player.gd"

  • content (string): Full GDScript source code to write.

Returns: Confirmation with the file path.

Examples:

  • Use when: "Create a new movement script for the Player"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesres:// path for the script
contentYesFull GDScript source code
Behavior4/5

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

Annotations already indicate this is a non-readOnly, idempotent, non-destructive write operation. The description adds valuable context beyond annotations by explicitly stating 'creates or overwrites' (clarifying idempotent behavior) and specifying the file path format ('res:// path'), which helps the agent understand the tool's behavior more concretely.

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?

The description is efficiently structured with a clear purpose statement, organized sections (Args, Returns, Examples), and no redundant information. Every sentence serves a distinct purpose, making it easy to parse.

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?

For a write operation with good annotations (idempotent, non-destructive) and full parameter documentation, the description provides adequate context including purpose, usage example, and behavioral clarification. The lack of an output schema is compensated by the 'Returns' note, though more detail on the confirmation format would be helpful.

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%, with both parameters well-documented in the schema. The description's 'Args' section repeats the schema information without adding significant semantic context beyond what's already in the structured fields, meeting the baseline for high schema coverage.

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 clearly states the specific action ('writes'), resource ('GDScript file'), and scope ('creates or overwrites') with the path parameter. It distinguishes from siblings like godot_read_script (read vs. write) and godot_list_files (list vs. write).

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 'Examples: - Use when:' section provides clear context for when to use this tool ('Create a new movement script for the Player'), but it doesn't explicitly state when not to use it or name alternatives like godot_read_script for reading existing scripts.

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/ricky-yosh/godot-mcp-server'

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