Converter
Форматирует и отображает различия текста в различных стилях (объединенный, контекстный, бок о бок)
Вызовите этот инструмент из своего кода на трёх языках.
curl -X POST 'https://api.elysiatools.com/ru/api/tools/diff-formatter' \
-H 'Content-Type: application/json' \
-d '{"text1":"Enter the original text...","text2":"Enter the modified text...","formatStyle":"unified","showLineNumbers":true,"contextLines":3}'Отправьте POST-запрос с входными данными в JSON. Параметры типа «файл» требуют предварительной загрузки.
POST https://api.elysiatools.com/ru/api/tools/diff-formatter| Имя | Тип | Обязательный | Описание |
|---|---|---|---|
| text1 | textarea | Да | — |
| text2 | textarea | Да | — |
| formatStyle | select | Да | — |
| showLineNumbers | checkbox | Нет | — |
| contextLines | number | Нет | — |
Добавьте этот инструмент на свой сервер Model Context Protocol, чтобы ИИ-агенты могли перечислять и вызывать его.
Добавьте этот блок в конфигурацию вашего MCP-клиента:
{
"mcpServers": {
"elysiatools-diff-formatter": {
"name": "diff-formatter",
"description": "Форматирует и отображает различия текста в различных стилях (объединенный, контекстный, бок о бок)",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=diff-formatter",
"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": "diff-formatter",
"arguments": {
"text1": "Enter the original text...",
"text2": "Enter the modified text...",
"formatStyle": "unified",
"showLineNumbers": true,
"contextLines": 3
}
}
}Вопросы или проблемы? Свяжитесь с [email protected]
Текстовый результат
{
"result": "Processed text content",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}