Data Visualization
上传或粘贴 CSV 即刻出图:支持 Sturges / Freedman-Diaconis / Scott 分箱的直方图、带 Pearson r 与最小二乘拟合的散点图、Tukey 箱线图——每张图均可下载 PNG 与 SVG。
用三种语言从你的代码中调用此工具。
# 1) Request a presigned URL → returns { uploadUrl, storageKey }
curl -X POST 'http://127.0.0.1:3003/api/upload/presign/csv-histogram-scatter-box-plot-chart-studio' \
-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 'http://127.0.0.1:3003/zh/api/tools/csv-histogram-scatter-box-plot-chart-studio' \
-F 'csvFile=uploads/2026/01/01/your-tool-1700000000000-abc123.ext' \
-F 'csvData=hours,score,age
1.2,52,15
2.0,58,15
2.5,61,15
3.0,55,16
3.5,66,16
4.0,70,15
4.5,68,16
5.0,74,16
5.5,79,17
6.0,76,16
6.5,83,17
7.0,86,17
7.5,90,17
8.0,88,17' \
-F 'chartType=overview' \
-F 'numericColumns=' \
-F 'binRule=auto' \
-F 'binCount=10' \
-F 'scatterX=' \
-F 'scatterY=' \
-F 'showNormalCurve=true' \
-F 'showOutliers=true' \
-F 'colorScheme=default'以 JSON 形式 POST 提交输入参数。文件类型参数需先单独上传。
POST http://127.0.0.1:3003/zh/api/tools/csv-histogram-scatter-box-plot-chart-studio| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| csvFile | file需先上传 | 否 | — |
| csvData | textarea | 否 | — |
| chartType | select | 否 | — |
| numericColumns | text | 否 | — |
| binRule | select | 否 | — |
| binCount | number | 否 | — |
| scatterX | text | 否 | — |
| scatterY | text | 否 | — |
| showNormalCurve | checkbox | 否 | — |
| showOutliers | checkbox | 否 | — |
| colorScheme | select | 否 | — |
HTML 结果
{
"result": "<div>Processed HTML content</div>",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}将此工具加入你的 Model Context Protocol 服务,让 AI 智能体可以列出并调用它。
将以下内容加入你的 MCP 客户端配置:
{
"mcpServers": {
"elysiatools-csv-histogram-scatter-box-plot-chart-studio": {
"name": "csv-histogram-scatter-box-plot-chart-studio",
"description": "上传或粘贴 CSV 即刻出图:支持 Sturges / Freedman-Diaconis / Scott 分箱的直方图、带 Pearson r 与最小二乘拟合的散点图、Tukey 箱线图——每张图均可下载 PNG 与 SVG。",
"baseUrl": "http://127.0.0.1:3003/mcp/sse?toolId=csv-histogram-scatter-box-plot-chart-studio",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}连接到 SSE 端点后,列出已开放的工具:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}通过工具 id 调用,参数由其参数表构建:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "csv-histogram-scatter-box-plot-chart-studio",
"arguments": {
"csvFile": "https://example.com/file.ext",
"csvData": "hours,score,age\n1.2,52,15\n2.0,58,15\n2.5,61,15\n3.0,55,16\n3.5,66,16\n4.0,70,15\n4.5,68,16\n5.0,74,16\n5.5,79,17\n6.0,76,16\n6.5,83,17\n7.0,86,17\n7.5,90,17\n8.0,88,17",
"chartType": "overview",
"numericColumns": "",
"binRule": "auto",
"binCount": 10,
"scatterX": "",
"scatterY": "",
"showNormalCurve": true,
"showOutliers": true,
"colorScheme": "default"
}
}
}有问题或反馈?请联系 [email protected]