Skip to main content
Glama
attestedintelligence

AGA-mcp-server

init_chain

Initialize a tamper-evident continuity chain to attest and log AI agent tool calls against sealed cryptographic references for policy enforcement.

Instructions

Initialize continuity chain (alias for aga_init_chain). (Claim 3a)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
specification_hashNo

Implementation Reference

  • The `handleInitChain` function initializes the continuity chain by creating a genesis event, storing it in the context's storage, and updating the context state.
    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:88-92 (registration)
    Registration of the 'init_chain' tool in `src/server.ts`, which aliases 'aga_init_chain' and calls `handleInitChain`.
    server.tool('init_chain',
      'Initialize continuity chain (alias for aga_init_chain). (Claim 3a)',
      { specification_hash: z.string().optional() },
      async (args) => handleInitChain(args, ctx),
    );
  • src/server.ts:81-85 (registration)
    Registration of the 'aga_init_chain' tool in `src/server.ts`, which calls `handleInitChain`.
    server.tool('aga_init_chain',
      'Initialize continuity chain with genesis event. (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