Skip to main content
Glama

create_scene

Generate a new Godot scene file with a specified root node type and name for game development projects.

Instructions

Create a brand new empty .tscn scene file with just a root node.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesFile path for the new scene
rootTypeYesGodot type for the root node
rootNameYesName for the root node

Implementation Reference

  • The handler function for the create_scene tool which creates and writes a new .tscn file.
    handler: async (ctx) => {
      const { path: filePath, rootType, rootName } = ctx.args;
      validatePath(filePath);
    
      try {
        const scene: SceneInfo = {
          filePath,
          rootType,
          rootName,
          nodes: new Map(),
          signalConnections: [],
          instancedScenes: [],
          externalResources: [],
          subResources: [],
          contentHash: "",
          rawSource: "",
        };
    
        const root: NodeInfo = {
          name: rootName,
          type: rootType,
          scenePath: filePath,
          nodePath: rootName,
          parent: null,
          children: [],
          script: null,
          groups: [],
          properties: {},
          isInstanceOf: null,
          rawSpan: null,
        };
    
        scene.nodes.set(rootName, root);
    
        if (ctx.signal?.aborted) {
          throw new GodotteError(ErrorCode.TOOL_TIMEOUT, "Write aborted: tool timed out");
        }
        const output = serializeTscn(scene);
        await writeFile(filePath, output, "utf-8");
    
        await eventBus.emit("file:changed", {
          path: filePath,
          type: "created",
        });
    
        return makeTextResponse({
          data: {
            path: filePath,
            rootType,
            rootName,
          },
          metadata: { source: "index" },
        });
      } catch (err) {
        return makeTextResponse({
          error: `Failed to create scene: ${(err as Error).message}`,
          data: null,
        });
  • The input schema for the create_scene tool.
    schema: {
      path: z.string().describe("File path for the new scene"),
      rootType: z.string().describe("Godot type for the root node"),
      rootName: z.string().describe("Name for the root node"),
    },
  • Registration of the create_scene tool within the createSceneEditTools function.
    name: "create_scene",
    description: "Create a brand new empty .tscn scene file with just a root node.",
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the tool creates a file but doesn't specify permissions needed, whether it overwrites existing files, error conditions, or what happens on success. For a file creation tool with zero annotation coverage, this leaves significant behavioral gaps.

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 a single, efficient sentence that front-loads the core purpose without any wasted words. Every element ('brand new empty .tscn scene file', 'with just a root node') earns its place by adding specificity.

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?

Given the tool's moderate complexity (file creation with three parameters), no annotations, and no output schema, the description is minimally adequate. It covers the what but lacks behavioral details, error handling, or output expectations that would make it fully complete for an agent.

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%, so the schema fully documents all three parameters. The description doesn't add any parameter-specific details beyond what's in the schema, such as path format requirements or valid root types. Baseline 3 is appropriate when the schema does the heavy lifting.

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 ('Create'), resource ('brand new empty .tscn scene file'), and scope ('with just a root node'). It distinguishes itself from sibling tools like 'create_file' by specifying the scene file type and root node structure.

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 implies usage for creating Godot scene files but doesn't explicitly state when to use this tool versus alternatives like 'create_file' or 'add_node'. No guidance is provided on prerequisites, exclusions, or specific contexts for choosing this tool.

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/woohq/godette-mcp'

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