Format Conversion
Genera sentencias INSERT a partir de Excel
Llama a esta herramienta desde tu código en tres lenguajes.
# 1) Upload each file first → returns { filePath }
curl -X POST 'https://api.elysiatools.com/upload/xlsx-sql-insert-generator' \
-F 'file=@/path/to/excelFile.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/es/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'Envía una petición POST con tus entradas en JSON. Los parámetros de tipo archivo requieren una subida previa.
POST https://api.elysiatools.com/es/api/tools/xlsx-sql-insert-generator| Nombre | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| excelFile | filesubida requerida | Sí | — |
| tableName | text | Sí | — |
| sheetName | text | No | — |
| headerRow | number | No | — |
| selectedColumns | text | No | — |
| dialect | select | No | — |
| useBatchInsert | checkbox | No | — |
| batchSize | number | No | — |
| nullForEmpty | checkbox | No | — |
| terminateWithSemicolon | checkbox | No | — |
Resultado de archivo
{
"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)"
}Añade esta herramienta a tu servidor Model Context Protocol para que los agentes de IA puedan listarla y llamarla.
Añade este bloque a la configuración de tu cliente MCP:
{
"mcpServers": {
"elysiatools-xlsx-sql-insert-generator": {
"name": "xlsx-sql-insert-generator",
"description": "Genera sentencias INSERT a partir de Excel",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=xlsx-sql-insert-generator",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}Tras conectar al endpoint SSE, lista las herramientas expuestas:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoca la herramienta por su id; los argumentos se construyen a partir de sus parámetros:
{
"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
}
}
}¿Dudas o problemas? Contacta con [email protected]