Skip to main content
Glama

capture_state

Capture a snapshot of the current game state from a running Godot project to analyze or debug specific nodes and components.

Instructions

Capture a snapshot of the game state from the running project. Optionally specify a node path to narrow the capture.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodePathNoNode path to capture state from (e.g. 'Player', 'UI/HealthBar')

Implementation Reference

  • The handler function for the capture_state tool. It uses the plugin client to send the captureState command.
      handler: async (ctx) => {
        const { nodePath } = ctx.args;
        const client = requirePlugin(getPluginClient());
        const params: Record<string, unknown> = {};
        if (nodePath) params.node_path = nodePath;
        const result = await client.sendCommand(PLUGIN_COMMANDS.captureState, params);
        return makeTextResponse({ data: result });
      },
    },
  • Registration of the capture_state tool in the createRuntimeTools function.
      name: "capture_state",
      description:
        "Capture a snapshot of the game state from the running project. Optionally specify a node path to narrow the capture.",
      schema: {
        nodePath: z
          .string()
          .optional()
          .describe("Node path to capture state from (e.g. 'Player', 'UI/HealthBar')"),
      },
      handler: async (ctx) => {
        const { nodePath } = ctx.args;
        const client = requirePlugin(getPluginClient());
        const params: Record<string, unknown> = {};
        if (nodePath) params.node_path = nodePath;
        const result = await client.sendCommand(PLUGIN_COMMANDS.captureState, params);
        return makeTextResponse({ data: result });
      },
    },

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