boscli_module_disable
Disable a BOS module by providing its name, deactivating it within the ERP system.
Instructions
Disable a BOS module by name
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| module_name | Yes | Name of the module to disable |
Implementation Reference
- src/tools/module.ts:23-28 (handler)The handler definition for the boscli_module_disable tool. It accepts a 'module_name' argument and sends a POST request to /boscli/modules/{module_name}/disable via the BosApiClient.
{ name: 'boscli_module_disable', description: 'Disable a BOS module by name', schema: { module_name: { type: 'string', description: 'Name of the module to disable' } }, handler: async (args, client) => client.post(`/boscli/modules/${args.module_name}/disable`), }, - src/tools/module.ts:23-28 (schema)The schema definition for boscli_module_disable. It requires a single 'module_name' string parameter that specifies which module to disable.
{ name: 'boscli_module_disable', description: 'Disable a BOS module by name', schema: { module_name: { type: 'string', description: 'Name of the module to disable' } }, handler: async (args, client) => client.post(`/boscli/modules/${args.module_name}/disable`), }, - src/tools/module.ts:4-29 (registration)The moduleTools array containing the boscli_module_disable tool entry alongside other module-related tools. This array is exported and later imported in src/index.ts, src/stdio.ts, and src/http.ts where tools are registered with the MCP server via server.tool().
export const moduleTools: McpTool[] = [ { name: 'boscli_module_list', description: 'List all BOS modules with their enabled/disabled status', schema: {}, handler: async (_, client) => client.get('/boscli/modules'), }, { name: 'boscli_module_show', description: 'Get details of a specific BOS module', schema: { module_name: { type: 'string', description: 'Name of the module to check' } }, handler: async (args, client) => client.get(`/boscli/modules/${args.module_name}`), }, { 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`), }, { name: 'boscli_module_disable', description: 'Disable a BOS module by name', schema: { module_name: { type: 'string', description: 'Name of the module to disable' } }, handler: async (args, client) => client.post(`/boscli/modules/${args.module_name}/disable`), }, ]; - src/tools/bos.ts:54-76 (registration)The registration loop in the main entry point (index.ts) that iterates over all tools (including moduleTools) and registers them with the MCP server using server.tool(). This is where boscli_module_disable gets registered with the MCP SDK.
schema: { product_id: { type: 'string' }, name: { type: 'string', optional: true }, price: { type: 'number', optional: true }, stock: { type: 'number', optional: true }, status: { type: 'string', optional: true }, }, handler: async (args, client) => { const { product_id, ...data } = args; return client.put(`/mcp/products/${product_id}`, data); }, }, { name: 'bos_product_delete', description: 'Delete a product', schema: { product_id: { type: 'string' } }, handler: async (args, client) => client.delete(`/mcp/products/${args.product_id}`), }, { name: 'bos_product_variants', description: 'Get all variants for a product', schema: { product_id: { type: 'string' } }, handler: async (args, client) => client.get(`/mcp/products/${args.product_id}/variants`), - src/client/index.ts:94-96 (helper)The BosApiClient.post() method used by the boscli_module_disable handler to send the POST request to the backend API.
async post<T>(path: string, data?: any): Promise<T> { return this.request<T>('POST', path, data); }