Format Conversion
Генерирует SQL INSERT из Excel
Вызовите этот инструмент из своего кода на трёх языках.
# 1) Request a presigned URL → returns { uploadUrl, storageKey }
curl -X POST 'https://api.elysiatools.com/api/upload/presign/xlsx-sql-insert-generator' \
-H 'Content-Type: application/json' \
-d '{"filename":"excelFile.ext","contentType":"application/octet-stream","size":12345}'
# 2) PUT the file bytes directly to the presigned uploadUrl
curl -X PUT '<presigned uploadUrl>' \
--data-binary @/path/to/file.ext
# 3) Call the tool, passing the returned storageKey for each file field
curl -X POST 'https://api.elysiatools.com/ru/api/tools/xlsx-sql-insert-generator' \
-F 'excelFile=/public/samples/xlsx/workbook-sales.xlsx' \
-F 'tableName=sales_records' \
-F 'sheetName=Sheet1' \
-F 'headerRow=1' \
-F 'selectedColumns=id,name,amount' \
-F 'dialect=postgresql' \
-F 'useBatchInsert=true' \
-F 'batchSize=500' \
-F 'nullForEmpty=true' \
-F 'terminateWithSemicolon=true'Отправьте POST-запрос с входными данными в JSON. Параметры типа «файл» требуют предварительной загрузки.
POST https://api.elysiatools.com/ru/api/tools/xlsx-sql-insert-generator| Имя | Тип | Обязательный | Описание |
|---|---|---|---|
| excelFile | fileнужна загрузка | Да | — |
| tableName | text | Да | — |
| sheetName | text | Нет | — |
| headerRow | number | Нет | — |
| selectedColumns | text | Нет | — |
| dialect | select | Нет | — |
| useBatchInsert | checkbox | Нет | — |
| batchSize | number | Нет | — |
| nullForEmpty | checkbox | Нет | — |
| terminateWithSemicolon | checkbox | Нет | — |
Файловый результат
{
"filePath": "/public/processing/randomid.ext",
"fileName": "output.ext",
"contentType": "application/octet-stream",
"size": 1024,
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}Добавьте этот инструмент на свой сервер Model Context Protocol, чтобы ИИ-агенты могли перечислять и вызывать его.
Добавьте этот блок в конфигурацию вашего MCP-клиента:
{
"mcpServers": {
"elysiatools-xlsx-sql-insert-generator": {
"name": "xlsx-sql-insert-generator",
"description": "Генерирует SQL INSERT из Excel",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=xlsx-sql-insert-generator",
"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": "xlsx-sql-insert-generator",
"arguments": {
"excelFile": "/public/samples/xlsx/workbook-sales.xlsx",
"tableName": "sales_records",
"sheetName": "Sheet1",
"headerRow": 1,
"selectedColumns": "id,name,amount",
"dialect": "postgresql",
"useBatchInsert": true,
"batchSize": 500,
"nullForEmpty": true,
"terminateWithSemicolon": true
}
}
}Вопросы или проблемы? Свяжитесь с [email protected]