Format Conversion
Escribe JSON de REST/GraphQL en una hoja de Excel
Llama a esta herramienta desde tu código en tres lenguajes.
curl -X POST 'https://api.elysiatools.com/es/api/tools/xlsx-api-to-sheet' \
-H 'Content-Type: application/json' \
-d '{"sourceType":"rest","url":"https://elysiatools.com/zh/api/tools","method":"GET","headers":"{\"Authorization\":\"Bearer xxx\"}","queryParams":"{\"status\":\"active\"}","body":"{\"filters\":{\"status\":\"active\"}}","graphqlQuery":"query($page:Int,$limit:Int){ items(page:$page,limit:$limit){ id name } }","graphqlVariables":"{\"status\":\"active\"}","dataPath":"tools","paginationType":"none","maxPages":50,"pageParam":"page","pageStart":1,"pageSizeParam":"limit","pageSize":100,"offsetParam":"offset","offsetStart":0,"cursorParam":"cursor","cursorStart":"","hasMorePath":"data.pageInfo.hasNextPage","nextCursorPath":"pageInfo.endCursor","totalPagesPath":"meta.totalPages","fieldMapping":"{\n \"id\": \"id\",\n \"name\": \"name\",\n \"category\": \"category\",\n \"result_type\": \"resultType\",\n \"featured\": \"featured\",\n \"last_updated\": \"lastUpdated\"\n}","sheetName":"Tools API","outputFileName":"api-export"}'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-api-to-sheet| Nombre | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| sourceType | select | No | — |
| url | text | Sí | — |
| method | select | No | — |
| headers | textarea | No | — |
| queryParams | textarea | No | — |
| body | textarea | No | — |
| graphqlQuery | textarea | No | — |
| graphqlVariables | textarea | No | — |
| dataPath | text | No | — |
| paginationType | select | No | — |
| maxPages | number | No | — |
| pageParam | text | No | — |
| pageStart | number | No | — |
| pageSizeParam | text | No | — |
| pageSize | number | No | — |
| offsetParam | text | No | — |
| offsetStart | number | No | — |
| cursorParam | text | No | — |
| cursorStart | text | No | — |
| hasMorePath | text | No | — |
| nextCursorPath | text | No | — |
| totalPagesPath | text | No | — |
| fieldMapping | textarea | No | — |
| sheetName | text | No | — |
| outputFileName | text | 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-api-to-sheet": {
"name": "xlsx-api-to-sheet",
"description": "Escribe JSON de REST/GraphQL en una hoja de Excel",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=xlsx-api-to-sheet",
"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-api-to-sheet",
"arguments": {
"sourceType": "rest",
"url": "https://elysiatools.com/zh/api/tools",
"method": "GET",
"headers": "{\"Authorization\":\"Bearer xxx\"}",
"queryParams": "{\"status\":\"active\"}",
"body": "{\"filters\":{\"status\":\"active\"}}",
"graphqlQuery": "query($page:Int,$limit:Int){ items(page:$page,limit:$limit){ id name } }",
"graphqlVariables": "{\"status\":\"active\"}",
"dataPath": "tools",
"paginationType": "none",
"maxPages": 50,
"pageParam": "page",
"pageStart": 1,
"pageSizeParam": "limit",
"pageSize": 100,
"offsetParam": "offset",
"offsetStart": 0,
"cursorParam": "cursor",
"cursorStart": "",
"hasMorePath": "data.pageInfo.hasNextPage",
"nextCursorPath": "pageInfo.endCursor",
"totalPagesPath": "meta.totalPages",
"fieldMapping": "{\n \"id\": \"id\",\n \"name\": \"name\",\n \"category\": \"category\",\n \"result_type\": \"resultType\",\n \"featured\": \"featured\",\n \"last_updated\": \"lastUpdated\"\n}",
"sheetName": "Tools API",
"outputFileName": "api-export"
}
}
}¿Dudas o problemas? Contacta con [email protected]