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
| Name | Required | Description | Default |
|---|---|---|---|
| scene | Yes | Path to the scene to search for instances of | |
| maxResults | No | Maximum results to return |
Implementation Reference
- src/tools/scene-tools.ts:446-464 (handler)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" }, }); }, }, - src/tools/scene-tools.ts:433-445 (registration)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"), },