aspro_list_entities
List entities in a module and their available methods. Use this to explore module structure and identify callable actions.
Instructions
List entities inside a given module along with the methods available on each entity.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| module | Yes | Module name, e.g. 'crm', 'fin', 'task'. |
Implementation Reference
- src/index.ts:53-71 (registration)Registration of 'aspro_list_entities' tool via server.registerTool, with Zod schema for 'module' input and a handler that delegates to spec.listEntities().
server.registerTool( "aspro_list_entities", { description: "List entities inside a given module along with the methods available on each entity.", inputSchema: { module: z.string().describe("Module name, e.g. 'crm', 'fin', 'task'."), }, }, async ({ module }) => { const entities = spec.listEntities(module); if (entities.length === 0) { return asJson({ error: `Unknown module "${module}". Call aspro_list_modules to see all options.`, }); } return asJson({ module, entities }); }, ); - src/index.ts:62-70 (handler)Handler function for aspro_list_entities: takes {module} parameter, calls spec.listEntities(module), returns JSON result or error if module unknown.
async ({ module }) => { const entities = spec.listEntities(module); if (entities.length === 0) { return asJson({ error: `Unknown module "${module}". Call aspro_list_modules to see all options.`, }); } return asJson({ module, entities }); }, - src/index.ts:58-61 (schema)Input schema for aspro_list_entities: a single required 'module' string parameter validated by Zod.
inputSchema: { module: z.string().describe("Module name, e.g. 'crm', 'fin', 'task'."), }, }, - src/spec.ts:161-170 (helper)SpecIndex.listEntities() helper: looks up the module in the indexed modules map and returns sorted entity objects with their available methods.
listEntities(module: string): { entity: string; methods: string[] }[] { const ents = this.modules.get(module); if (!ents) return []; return [...ents] .sort() .map((entity) => ({ entity, methods: [...(this.entityMethods.get(`${module}/${entity}`) ?? [])].sort(), })); }