boscli_module_show
Get detailed information about a specific module in the BOS ERP system. Provide the module name to retrieve its configuration, status, and metadata for troubleshooting and management.
Instructions
Get details of a specific BOS module
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| module_name | Yes | Name of the module to check |
Implementation Reference
- src/tools/module.ts:11-15 (handler)The handler for 'boscli_module_show'. It accepts a 'module_name' parameter and makes a GET request to /boscli/modules/{module_name} via the BosApiClient.
{ 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}`), - src/tools/module.ts:14-14 (schema)The input schema for 'boscli_module_show' declares a required 'module_name' string parameter.
schema: { module_name: { type: 'string', description: 'Name of the module to check' } }, - src/index.ts:55-76 (registration)The tool registration loop in src/index.ts iterates over allTools (including moduleTools) and calls server.tool() to register each one with MCP.
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/index.ts:29-30 (registration)moduleTools is imported and spread into the allTools array in src/index.ts, which is how the tool gets registered.
...moduleTools, ...routeTools, - src/tools/index.ts:4-62 (helper)The McpTool interface defines the shape (name, description, schema, handler) that the tool definition conforms to.
export interface McpTool { name: string; description: string; schema: Record<string, any>; handler: (args: any, client: BosApiClient) => Promise<any>; } export interface ToolCategory { name: string; tools: McpTool[]; } /** * Convert our simple schema format to Zod schema for MCP SDK. * Input: { field: { type: 'string', optional: true, description: '...' } } * Output: z.object({ field: z.string().optional().describe('...') }) */ export function toZodSchema(schema: Record<string, any>): z.ZodObject<any> { const shape: Record<string, z.ZodTypeAny> = {}; for (const [key, def] of Object.entries(schema)) { let field: z.ZodTypeAny; switch (def.type) { case 'number': field = z.number(); break; case 'boolean': field = z.boolean(); break; case 'array': field = z.array(z.any()); break; case 'object': field = z.record(z.any()); break; case 'string': default: if (def.enum) { field = z.enum(def.enum); } else { field = z.string(); } break; } if (def.description) { field = field.describe(def.description); } if (def.optional) { field = field.optional(); } shape[key] = field; } return z.object(shape); }