Skip to main content
Glama

find_scene_instances

Locate all scenes that use a specific scene in Godot projects, showing parent node paths for dependency tracking and project analysis.

Instructions

Find all scenes that instance (use) a given scene, with parent node paths.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sceneYesPath to the scene to search for instances of
maxResultsNoMaximum results to return

Implementation Reference

  • The handler for the 'find_scene_instances' tool, which searches for scene instances in the index and handles path formatting.
      handler: async (ctx) => {
        const { scene, maxResults = 20 } = ctx.args;
        validatePath(scene);
    
        let results = await index.findSceneInstances(scene);
        // instanceRefs are keyed by res:// paths; try res:// form too
        if (results.length === 0 && projectRoot) {
          const resPath = absoluteToRes(scene, projectRoot);
          results = await index.findSceneInstances(resPath);
        }
        const truncated = results.length > maxResults;
        return makeTextResponse({
          data: results.slice(0, maxResults),
          truncated,
          totalCount: results.length,
          metadata: { source: "index" },
        });
      },
    },
  • Tool registration for 'find_scene_instances' including name, description, and schema.
    name: "find_scene_instances",
    description: "Find all scenes that instance (use) a given scene, with parent node paths.",
    schema: {
      scene: z.string().describe("Path to the scene to search for instances of"),
      maxResults: z
        .number()
        .int()
        .min(1)
        .max(500)
        .optional()
        .default(20)
        .describe("Maximum results to return"),
    },

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