boscli_route_by_module
Retrieve all routes for a specific BOS module. Filter routes by module name to view available endpoints.
Instructions
Get all routes for a specific BOS module
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| module | Yes | Module name to filter routes |
Implementation Reference
- src/tools/route.ts:14-18 (handler)Handler function that calls client.get('/boscli/routes/${args.module}') to fetch routes for a specific module. The module name from the args is interpolated into the URL path.
{ name: 'boscli_route_by_module', description: 'Get all routes for a specific BOS module', schema: { module: { type: 'string', description: 'Module name to filter routes' } }, handler: async (args, client) => client.get(`/boscli/routes/${args.module}`), - src/tools/route.ts:17-17 (schema)Input schema for 'boscli_route_by_module' requiring a single string parameter 'module' with description 'Module name to filter routes'.
schema: { module: { type: 'string', description: 'Module name to filter routes' } }, - src/index.ts:54-76 (registration)Tool registration in src/index.ts: routeTools (including boscli_route_by_module) is registered via server.tool() in the allTools loop using toZodSchema() to convert the schema.
// Register all tools with proper Zod schemas 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-74 (registration)Alternative registration in the stdio entry point (src/stdio.ts) - same loop-based registration of all tools including boscli_route_by_module.
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)Alternative registration in the HTTP/SSE entry point (src/http.ts) - same loop-based registration of all tools including boscli_route_by_module.
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, }; } } ); }