boscli_module_enable
Activate a specific BOS module by name to enable its functionality within the ERP system.
Instructions
Enable a BOS module by name
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| module_name | Yes | Name of the module to enable |
Implementation Reference
- src/tools/module.ts:17-21 (handler)The handler for 'boscli_module_enable' - sends a POST request to /boscli/modules/{module_name}/enable via the BosApiClient.
{ name: 'boscli_module_enable', description: 'Enable a BOS module by name', schema: { module_name: { type: 'string', description: 'Name of the module to enable' } }, handler: async (args, client) => client.post(`/boscli/modules/${args.module_name}/enable`), - src/tools/module.ts:20-20 (schema)Schema definition for boscli_module_enable: requires a 'module_name' string field.
schema: { module_name: { type: 'string', description: 'Name of the module to enable' } }, - src/index.ts:55-76 (registration)Registration in src/index.ts: the tool is registered via server.tool() with its name, description, Zod schema, and handler wrapped in a try-catch.
for (const tool of allTools) { const zodSchema = toZodSchema(tool.schema); server.tool( tool.name, tool.description, zodSchema.shape, async (args: any) => { try { const result = await tool.handler(args, client); return { content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }], }; } catch (error: any) { return { content: [{ type: 'text' as const, text: JSON.stringify({ error: error.message || 'Unknown error' }) }], isError: true, }; } } ); } - src/stdio.ts:54-75 (registration)Registration in src/stdio.ts: same pattern - tool registered with MCP SDK via server.tool().
for (const tool of allTools) { const zodSchema = toZodSchema(tool.schema); server.tool( tool.name, tool.description, zodSchema.shape, async (args: any) => { try { const result = await tool.handler(args, client); return { content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }], }; } catch (error: any) { return { content: [{ type: 'text' as const, text: JSON.stringify({ error: error.message || 'Unknown error' }) }], isError: true, }; } } ); } - src/http.ts:55-75 (registration)Registration in src/http.ts: same pattern - tool registered with MCP SDK via server.tool().
for (const tool of allTools) { const zodSchema = toZodSchema(tool.schema); server.tool( tool.name, tool.description, zodSchema.shape, async (args: any) => { try { const result = await tool.handler(args, client); return { content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }], }; } catch (error: any) { return { content: [{ type: 'text' as const, text: JSON.stringify({ error: error.message || 'Unknown error' }) }], isError: true, }; } } ); }