Development
Применяет семантические мутации к полям OpenAPI и при необходимости отправляет их на реальный backend для проверки защитной валидации
Вызовите этот инструмент из своего кода на трёх языках.
curl -X POST 'https://api.elysiatools.com/ru/api/tools/api-contract-mutation-tester' \
-H 'Content-Type: application/json' \
-d '{"openApiSpec":"openapi: 3.0.3\npaths:\n /users:\n post:\n requestBody:\n required: true\n content:\n application/json:\n schema:\n type: object\n required: [email, role, age]\n properties:\n email: { type: string, minLength: 5 }\n role: { type: string, enum: [admin, member] }\n age: { type: integer, minimum: 18 }\n responses:\n \"201\": { description: created }\n \"400\": { description: invalid }\n","baseUrl":"","executeMutations":false,"authorizationHeader":"","mutationsPerField":3,"timeoutMs":8000}'Отправьте POST-запрос с входными данными в JSON. Параметры типа «файл» требуют предварительной загрузки.
POST https://api.elysiatools.com/ru/api/tools/api-contract-mutation-tester| Имя | Тип | Обязательный | Описание |
|---|---|---|---|
| openApiSpec | textarea | Да | — |
| baseUrl | text | Нет | — |
| executeMutations | checkbox | Нет | — |
| authorizationHeader | text | Нет | — |
| mutationsPerField | number | Нет | — |
| timeoutMs | number | Нет | — |
JSON-результат
{
"key": {...},
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}Добавьте этот инструмент на свой сервер Model Context Protocol, чтобы ИИ-агенты могли перечислять и вызывать его.
Добавьте этот блок в конфигурацию вашего MCP-клиента:
{
"mcpServers": {
"elysiatools-api-contract-mutation-tester": {
"name": "api-contract-mutation-tester",
"description": "Применяет семантические мутации к полям OpenAPI и при необходимости отправляет их на реальный backend для проверки защитной валидации",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=api-contract-mutation-tester",
"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": "api-contract-mutation-tester",
"arguments": {
"openApiSpec": "openapi: 3.0.3\npaths:\n /users:\n post:\n requestBody:\n required: true\n content:\n application/json:\n schema:\n type: object\n required: [email, role, age]\n properties:\n email: { type: string, minLength: 5 }\n role: { type: string, enum: [admin, member] }\n age: { type: integer, minimum: 18 }\n responses:\n \"201\": { description: created }\n \"400\": { description: invalid }\n",
"baseUrl": "",
"executeMutations": false,
"authorizationHeader": "",
"mutationsPerField": 3,
"timeoutMs": 8000
}
}
}Вопросы или проблемы? Свяжитесь с [email protected]