Format Conversion
Construit des rapports avec en-tetes et sous-totaux
Appelez cet outil depuis votre code en trois langages.
curl -X POST 'https://api.elysiatools.com/fr/api/tools/xlsx-dynamic-report-builder' \
-H 'Content-Type: application/json' \
-d '{"dataJson":"[\n {\n \"region\": \"APAC\",\n \"dept\": \"Sales\",\n \"revenue\": 12000,\n \"cost\": 7200,\n \"profit\": 4800\n },\n {\n \"region\": \"APAC\",\n \"dept\": \"Ops\",\n \"revenue\": 8000,\n \"cost\": 5200,\n \"profit\": 2800\n },\n {\n \"region\": \"EMEA\",\n \"dept\": \"Sales\",\n \"revenue\": 15000,\n \"cost\": 8600,\n \"profit\": 6400\n },\n {\n \"region\": \"EMEA\",\n \"dept\": \"Ops\",\n \"revenue\": 9000,\n \"cost\": 5700,\n \"profit\": 3300\n }\n]","groupBy":"region","fixedColumns":"region,dept","valueColumns":"revenue,cost,profit","headerGroupsJson":"{\n \"Organization\": [\n \"region\",\n \"dept\"\n ],\n \"Financials\": [\n \"revenue\",\n \"cost\",\n \"profit\"\n ]\n}","includeGrandTotal":true,"sheetName":"Dynamic Report"}'Envoyez une requête POST avec vos entrées en JSON. Les paramètres de type fichier nécessitent un upload préalable.
POST https://api.elysiatools.com/fr/api/tools/xlsx-dynamic-report-builder| Nom | Type | Requis | Description |
|---|---|---|---|
| dataJson | textarea | Oui | — |
| groupBy | text | Non | — |
| fixedColumns | text | Non | — |
| valueColumns | text | Non | — |
| headerGroupsJson | textarea | Non | — |
| includeGrandTotal | checkbox | Non | — |
| sheetName | text | Non | — |
Résultat fichier
{
"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)"
}Ajoutez cet outil à votre serveur Model Context Protocol pour que les agents IA puissent le lister et l'appeler.
Ajoutez ce bloc à la configuration de votre client MCP :
{
"mcpServers": {
"elysiatools-xlsx-dynamic-report-builder": {
"name": "xlsx-dynamic-report-builder",
"description": "Construit des rapports avec en-tetes et sous-totaux",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=xlsx-dynamic-report-builder",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}Après connexion au point d'accès SSE, listez les outils exposés :
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Appelez l'outil par son id ; les arguments sont construits à partir de ses paramètres :
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "xlsx-dynamic-report-builder",
"arguments": {
"dataJson": "[\n {\n \"region\": \"APAC\",\n \"dept\": \"Sales\",\n \"revenue\": 12000,\n \"cost\": 7200,\n \"profit\": 4800\n },\n {\n \"region\": \"APAC\",\n \"dept\": \"Ops\",\n \"revenue\": 8000,\n \"cost\": 5200,\n \"profit\": 2800\n },\n {\n \"region\": \"EMEA\",\n \"dept\": \"Sales\",\n \"revenue\": 15000,\n \"cost\": 8600,\n \"profit\": 6400\n },\n {\n \"region\": \"EMEA\",\n \"dept\": \"Ops\",\n \"revenue\": 9000,\n \"cost\": 5700,\n \"profit\": 3300\n }\n]",
"groupBy": "region",
"fixedColumns": "region,dept",
"valueColumns": "revenue,cost,profit",
"headerGroupsJson": "{\n \"Organization\": [\n \"region\",\n \"dept\"\n ],\n \"Financials\": [\n \"revenue\",\n \"cost\",\n \"profit\"\n ]\n}",
"includeGrandTotal": true,
"sheetName": "Dynamic Report"
}
}
}Des questions ou un problème ? Contactez [email protected]