load-token-blueprint
Retrieve token blueprints for specific processes on Flux, an AI-powered MCP server, enabling streamlined interaction with Arweave OS for code and handler management.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| processId | Yes |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"processId": {
"type": "string"
}
},
"required": [
"processId"
],
"type": "object"
}
Implementation Reference
- src/mcp.ts:144-154 (registration)Registration of the 'load-token-blueprint' tool, including input schema { processId: z.string() } and handler function that invokes addBlueprint('token') to load and execute the token blueprint Lua code in the specified AO process.this.server.tool( "load-token-blueprint", "load the token blueprint in an existing AO process", { processId: z.string() }, async ({ processId }) => { const result = await addBlueprint("token", processId, this.signer); return { content: [{ type: "text", text: cleanOutput(result) }], }; } );
- src/helpers/blueprint.ts:9-18 (helper)Helper function addBlueprint that fetches the blueprint Lua source from GitHub repo and executes it in the target process via runLuaCode, implementing the core logic delegated by the tool handler.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; }