UNPKG

@inso_web/els-mcp

Version:

MCP-сервер поверх INSO Error Logs Service. Read-only tools (search, analytics, fingerprinting, correlations) для подключения Claude Desktop/Code и ChatGPT к логам ошибок. Streamable HTTP transport + stdio для npx-запуска.

58 lines 2.47 kB
/** * JSON Schema для `els.config.json` (auto-discovery конфиг проекта). * * Публикуется на `GET /els/schema/els.config.schema.json` без auth. * Используется IDE (VSCode/JetBrains) через `$schema`-ссылку в самом * файле — автокомплит полей. */ export const ELS_CONFIG_SCHEMA = { $schema: 'http://json-schema.org/draft-07/schema#', $id: 'https://mcp.insoweb.ru/els/schema/els.config.schema.json', title: 'INSO Event Logs project config', description: 'Project-level config for INSO Event Logs MCP auto-discovery. Place at project root as `els.config.json` or inline under `inso.els` in package.json.', type: 'object', additionalProperties: false, required: ['appSlug'], properties: { $schema: { type: 'string', description: 'URL of this JSON Schema (for editor autocomplete).', }, appSlug: { type: 'string', minLength: 1, maxLength: 255, description: 'Slug of the application as known to INSO ELS. Used by all tool calls when not specified explicitly.', }, environments: { type: 'object', description: 'Mapping of logical environment names (e.g. "dev", "production") to ELS deploymentEnv values ("DEV", "PRODUCTION").', additionalProperties: { type: 'string' }, examples: [{ dev: 'DEV', production: 'PRODUCTION' }], }, defaultEnvironment: { type: 'string', description: 'Default environment key from `environments` map. When agent is uncertain, this is used.', }, alerts: { type: 'object', additionalProperties: false, properties: { criticalRateThreshold: { type: 'number', minimum: 0, description: 'Threshold of CRITICAL errors per hour above which the agent should warn the user proactively.', }, }, }, }, }; export function elsConfigSchemaHandler() { const body = JSON.stringify(ELS_CONFIG_SCHEMA, null, 2); return function handler(_req, res) { res.setHeader('Cache-Control', 'public, max-age=3600'); res.setHeader('Content-Type', 'application/schema+json; charset=utf-8'); res.status(200).send(body); }; } //# sourceMappingURL=schema.js.map