Skip to main content
Glama

load-official-blueprint

Load predefined blueprints on Flux MCP server by specifying blueprintName and processId, enabling AI-powered creation, running, and testing of code and handlers in Arweave OS.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blueprintNameYes
processIdYes

Implementation Reference

  • src/mcp.ts:217-231 (registration)
    Registration of the 'load-official-blueprint' tool including name, description, Zod input schema, and inline handler function.
    this.server.tool(
      "load-official-blueprint",
      "load an official blueprint in an existing AO process",
      { blueprintName: z.string(), processId: z.string() },
      async ({ blueprintName, processId }) => {
        const result = await addBlueprint(
          blueprintName,
          processId,
          this.signer
        );
        return {
          content: [{ type: "text", text: cleanOutput(result) }],
        };
      }
    );
  • The handler function that implements the tool logic by invoking addBlueprint and formatting the response.
    async ({ blueprintName, processId }) => {
      const result = await addBlueprint(
        blueprintName,
        processId,
        this.signer
      );
      return {
        content: [{ type: "text", text: cleanOutput(result) }],
      };
    }
  • Input schema using Zod for blueprintName and processId parameters.
    { blueprintName: z.string(), processId: z.string() },
  • Core helper function that fetches the official blueprint Lua code from GitHub and loads it into the specified AO process.
    export async function addBlueprint(
      blueprintName: string,
      processId: string,
      signer: any
    ) {
      const url = `https://raw.githubusercontent.com/permaweb/aos/refs/heads/main/blueprints/${blueprintName}.lua`;
      const code = await fetchBlueprintCode(url);
      const result = await runLuaCode(code, processId, signer);
      return 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/asrvd/flux'

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