Skip to main content
Glama
attestedintelligence

AGA-mcp-server

aga_init_chain

Initialize a tamper-evident continuity chain with a genesis event to establish cryptographic attestation for AI agent tool calls.

Instructions

Initialize continuity chain with genesis event. (Claim 3a)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
specification_hashNo

Implementation Reference

  • The handler implementation for the aga_init_chain tool.
    export async function handleInitChain(args: { specification_hash?: string }, ctx: ServerContext) {
      if (ctx.chainInitialized) return ctx.error('Chain already initialized');
      const genesis = createGenesisEvent(ctx.chainKP, args.specification_hash ?? sha256Str('AGA Protocol Specification v2.0.0'));
      await ctx.storage.storeEvent(genesis);
      ctx.chainInitialized = true;
      ctx.portal.sequenceCounter = 0;
      ctx.portal.lastLeafHash = genesis.leaf_hash;
      return ctx.json({ success: true, genesis_event_id: genesis.event_id, genesis_leaf_hash: genesis.leaf_hash });
    }
  • src/server.ts:80-92 (registration)
    Tool registration of aga_init_chain in the MCP server.
    // 2. aga_init_chain (ungoverned)
    server.tool('aga_init_chain',
      'Initialize continuity chain with genesis event. (Claim 3a)',
      { specification_hash: z.string().optional() },
      async (args) => handleInitChain(args, ctx),
    );
    
    // Also register as init_chain for backward compat
    server.tool('init_chain',
      'Initialize continuity chain (alias for aga_init_chain). (Claim 3a)',
      { specification_hash: z.string().optional() },
      async (args) => handleInitChain(args, ctx),
    );

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/attestedintelligence/aga-mcp-server'

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