Data Processing
Определяет распространенные форматы логов, извлекает ключевые поля и выводит JSON, CSV или SQL.
Вызовите этот инструмент из своего кода на трёх языках.
# 1) Upload each file first → returns { filePath }
curl -X POST 'https://api.elysiatools.com/upload/structured-log-analyzer' \
-F 'file=@/path/to/logFile.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/ru/api/tools/structured-log-analyzer' \
-F 'logInput={"level":"error","service":"billing","message":"Charge failed"}
Mar 10 14:03:02 host app[123]: INFO Worker started' \
-F 'logFile=/path/to/file.ext' \
-F 'exportFormat=csv' \
-F 'aggregateMultiline=true' \
-F 'customRegex=^(?<timestamp>\S+) (?<level>\w+) (?<source>\w+) (?<message>.+)$'Отправьте POST-запрос с входными данными в JSON. Параметры типа «файл» требуют предварительной загрузки.
POST https://api.elysiatools.com/ru/api/tools/structured-log-analyzer| Имя | Тип | Обязательный | Описание |
|---|---|---|---|
| logInput | textarea | Нет | — |
| logFile | fileнужна загрузка | Нет | — |
| exportFormat | select | Нет | — |
| aggregateMultiline | checkbox | Нет | — |
| customRegex | text | Нет | — |
HTML-результат
{
"result": "<div>Processed HTML content</div>",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}Добавьте этот инструмент на свой сервер Model Context Protocol, чтобы ИИ-агенты могли перечислять и вызывать его.
Добавьте этот блок в конфигурацию вашего MCP-клиента:
{
"mcpServers": {
"elysiatools-structured-log-analyzer": {
"name": "structured-log-analyzer",
"description": "Определяет распространенные форматы логов, извлекает ключевые поля и выводит JSON, CSV или SQL.",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=structured-log-analyzer",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}После подключения к SSE-endpoint выведите список доступных инструментов:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Вызовите инструмент по его id; аргументы формируются из его параметров:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "structured-log-analyzer",
"arguments": {
"logInput": "{\"level\":\"error\",\"service\":\"billing\",\"message\":\"Charge failed\"}\nMar 10 14:03:02 host app[123]: INFO Worker started",
"logFile": "https://example.com/file.ext",
"exportFormat": "csv",
"aggregateMultiline": true,
"customRegex": "^(?<timestamp>\\S+) (?<level>\\w+) (?<source>\\w+) (?<message>.+)$"
}
}
}Вопросы или проблемы? Свяжитесь с [email protected]