get_routing_config
Retrieve routing configuration for Webasyst framework applications to manage URL structures and request handling.
Instructions
Получить конфигурацию маршрутизации
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app_id | No | ID приложения (опционально) |
Implementation Reference
- webasyst-mcp.js:152-158 (handler)Handler function that locates and reads the routing.php configuration file (either global in wa-config or app-specific in wa-apps/{app_id}/lib/config), then returns its content as a text response.async function getRoutingConfigTool({ app_id } = {}) { const rootPath = await findWebasystRoot(); const routingPath = app_id ? path.join(rootPath, 'wa-apps', app_id, 'lib', 'config', 'routing.php') : path.join(rootPath, 'wa-config', 'routing.php'); if (!(await fileExists(routingPath))) throw new Error('Конфигурация маршрутизации не найдена'); const content = await fs.readFile(routingPath, 'utf-8'); return { content: [{ type: 'text', text: `Конфигурация маршрутизации${app_id ? ` для ${app_id}` : ''}:\n\n${content}` }] }; }
- webasyst-mcp.js:1766-1766 (registration)Registers the tool call handler in the switch statement within the CallToolRequestSchema handler, mapping 'get_routing_config' to the getRoutingConfigTool function.case 'get_routing_config': return await getRoutingConfigTool(args);
- webasyst-mcp.js:1704-1706 (registration)Registers the tool metadata (name, description, input schema) in the tools list returned by ListToolsRequestSchema.{ name: 'get_routing_config', description: 'Получить конфигурацию маршрутизации', inputSchema: { type: 'object', properties: { app_id: { type: 'string', description: 'ID приложения (опционально)' } } } }, { name: 'get_system_config', description: 'Получить системную конфигурацию', inputSchema: { type: 'object', properties: {} } }, { name: 'run_webasyst_cli', description: 'Выполнить CLI команду Webasyst', inputSchema: { type: 'object', properties: { command: { type: 'string', description: 'CLI команда для выполнения' }, args: { type: 'array', items: { type: 'string' }, description: 'Аргументы команды', default: [] } }, required: ['command'] } },
- webasyst-mcp.js:1705-1706 (schema)Defines the input schema for the tool: optional app_id string parameter.{ name: 'get_system_config', description: 'Получить системную конфигурацию', inputSchema: { type: 'object', properties: {} } }, { name: 'run_webasyst_cli', description: 'Выполнить CLI команду Webasyst', inputSchema: { type: 'object', properties: { command: { type: 'string', description: 'CLI команда для выполнения' }, args: { type: 'array', items: { type: 'string' }, description: 'Аргументы команды', default: [] } }, required: ['command'] } },