Data Analysis
Detect class imbalance in CSV or JSON datasets, compare resampling strategies, and preview a balanced output dataset
Call this tool from your code in three languages.
# 1) Upload each file first → returns { filePath }
curl -X POST 'https://api.elysiatools.com/upload/dataset-imbalance-detector-resampler' \
-F 'file=@/path/to/datasetFile.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/en/api/tools/dataset-imbalance-detector-resampler' \
-F 'datasetInput=id,label,amount
1,normal,20
2,normal,21
3,normal,19
4,normal,22
5,fraud,300' \
-F 'datasetFile=/path/to/file.ext' \
-F 'labelColumn=label' \
-F 'strategy=oversample' \
-F 'exportFormat=json' \
-F 'previewRows=10'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/dataset-imbalance-detector-resampler| Name | Type | Required | Description |
|---|---|---|---|
| datasetInput | textarea | No | — |
| datasetFile | fileupload required | No | — |
| labelColumn | text | Yes | — |
| strategy | select | No | — |
| exportFormat | select | No | — |
| previewRows | number | No | — |
HTML result
{
"result": "<div>Processed HTML content</div>",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}Add this tool to your Model Context Protocol server so AI agents can list and call it.
Add this block to your MCP client configuration:
{
"mcpServers": {
"elysiatools-dataset-imbalance-detector-resampler": {
"name": "dataset-imbalance-detector-resampler",
"description": "Detect class imbalance in CSV or JSON datasets, compare resampling strategies, and preview a balanced output dataset",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=dataset-imbalance-detector-resampler",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}After connecting to the SSE endpoint, list the exposed tools:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoke the tool by its id, passing arguments built from its parameters:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "dataset-imbalance-detector-resampler",
"arguments": {
"datasetInput": "id,label,amount\n1,normal,20\n2,normal,21\n3,normal,19\n4,normal,22\n5,fraud,300",
"datasetFile": "https://example.com/file.ext",
"labelColumn": "label",
"strategy": "oversample",
"exportFormat": "json",
"previewRows": 10
}
}
}Questions or issues? Contact [email protected]