Data Processing
Transformer et traiter les données CSV avec des opérations de colonnes, calculs et conversions de types de données. Exemples d'opérations: • Renommer une colonne: [{"type": "rename", "column": "ancien_nom", "new_name": "nouveau_nom"}] • Ajouter une colonne calculée: [{"type": "add_column", "new_column": "total", "formula": "prix * quantite"}] • Supprimer une colonne: [{"type": "remove_column", "remove_column": "colonne_a_supprimer"}] • Convertir le type de donnée: [{"type": "convert_type", "convert_column": "age", "target_type": "number"}] • Calculer des valeurs: [{"type": "calculate", "target_column": "total", "expression": "prix * taxe + frais_port"}] • Filtrer les lignes: [{"type": "filter_values", "filter_column": "statut", "operator": "equals", "value": "actif"}]
Appelez cet outil depuis votre code en trois langages.
# 1) Request a presigned URL → returns { uploadUrl, storageKey }
curl -X POST 'https://api.elysiatools.com/api/upload/presign/csv-transformer' \
-H 'Content-Type: application/json' \
-d '{"filename":"csvFile.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/fr/api/tools/csv-transformer' \
-F 'csvFile=uploads/2026/01/01/your-tool-1700000000000-abc123.ext' \
-F 'transformations=Entrez les opérations de transformation au format JSON' \
-F 'outputFormat=csv' \
-F 'includeHeader=true' \
-F 'handleErrors=keep_original' \
-F 'errorHandling=log'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/csv-transformer| Nom | Type | Requis | Description |
|---|---|---|---|
| csvFile | fileupload requis | Oui | — |
| transformations | textarea | Oui | — |
| outputFormat | select | Non | — |
| includeHeader | checkbox | Non | — |
| handleErrors | select | Non | — |
| errorHandling | select | 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-csv-transformer": {
"name": "csv-transformer",
"description": "Transformer et traiter les données CSV avec des opérations de colonnes, calculs et conversions de types de données.\n\nExemples d'opérations:\n• Renommer une colonne: [{\"type\": \"rename\", \"column\": \"ancien_nom\", \"new_name\": \"nouveau_nom\"}]\n• Ajouter une colonne calculée: [{\"type\": \"add_column\", \"new_column\": \"total\", \"formula\": \"prix * quantite\"}]\n• Supprimer une colonne: [{\"type\": \"remove_column\", \"remove_column\": \"colonne_a_supprimer\"}]\n• Convertir le type de donnée: [{\"type\": \"convert_type\", \"convert_column\": \"age\", \"target_type\": \"number\"}]\n• Calculer des valeurs: [{\"type\": \"calculate\", \"target_column\": \"total\", \"expression\": \"prix * taxe + frais_port\"}]\n• Filtrer les lignes: [{\"type\": \"filter_values\", \"filter_column\": \"statut\", \"operator\": \"equals\", \"value\": \"actif\"}]",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=csv-transformer",
"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": "csv-transformer",
"arguments": {
"csvFile": "https://example.com/file.ext",
"transformations": "Entrez les opérations de transformation au format JSON",
"outputFormat": "csv",
"includeHeader": true,
"handleErrors": "keep_original",
"errorHandling": "log"
}
}
}Des questions ou un problème ? Contactez [email protected]