#!/usr/bin/env node // Print @endo/agent-mcp-stdio's tool catalog (name, description, inputSchema) // as JSON, from an Endo checkout: the snapshot endo-catalog.json, which the // fake host serves from so its tools are Endo's. // // usage: node endo_catalog.mjs ENDO_CHECKOUT > endo-catalog.json import { pathToFileURL } from 'node:url'; import { join } from 'node:path'; const [endo] = process.argv.slice(2); const at = rel => pathToFileURL(join(endo, rel)).href; await import(at('packages/init/index.js')); const { makeAgentTools } = await import( at('packages/agent-mcp-stdio/src/agent-interface.js') ); const tools = makeAgentTools().tools ?? makeAgentTools(); console.log( JSON.stringify( tools.map(({ name, description, inputSchema }) => ({ name, description, inputSchema, })), null, 2, ), );