Skip to main content
Glama

find_resource

Search for specific resource types within Godot projects to locate assets like ShaderMaterial files across indexed content.

Instructions

Find resources by type across the indexed project.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYesResource type to search for (e.g. 'ShaderMaterial')
maxResultsNoMaximum results to return

Implementation Reference

  • Handler for the find_resource tool which queries the resourceIndex by type.
    handler: async (ctx) => {
      const { type, maxResults = 50 } = ctx.args;
      const results = await index.resourceIndex.findByType(type);
      const truncated = results.length > maxResults;
      const data = results.slice(0, maxResults).map((r) => ({
        filePath: r.filePath,
        type: r.type,
        properties: Object.keys(r.properties),
        externalDeps: r.externalDeps,
      }));
    
      return makeTextResponse({
        data,
        truncated,
        totalCount: results.length,
        metadata: { source: "index" },
      });
    },
  • Input schema for find_resource defining type and maxResults parameters.
    schema: {
      type: z.string().describe("Resource type to search for (e.g. 'ShaderMaterial')"),
      maxResults: z
        .number()
        .int()
        .min(1)
        .max(500)
        .optional()
        .default(50)
        .describe("Maximum results to return"),
    },
  • Tool registration for find_resource in createResourceTools.
    {
      name: "find_resource",
      description: "Find resources by type across the indexed project.",

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