Development
逐行外科手术式修复畸形 CSV 行:未转义(游离)引号、混合分隔符(同一文件中制表符/分号/逗号混用)、带 BOM 的表头、CRLF/CR 换行符与多余空行。外科医生采用容错解析,以红绿逐行 diff 显示每一处改动(前 → 后,并标注修复原因),列出未改动的行,并输出清洗后的 CSV。可选 AI 修复会在确定性修复后复查可疑行。它补足 CSV 校验器(仅报告问题)——真正修复受损行。
用三种语言从你的代码中调用此工具。
curl -X POST 'https://api.elysiatools.com/zh/api/tools/csv-malformed-row-surgeon' \
-H 'Content-Type: application/json' \
-d '{"csvInput":"id,name,note\r\n1,Ada,\"loves, commas\"\r\n2,Grace\" Hopper,unescaped quote\r\n3\tLinus\ttab row\r\n","delimiter":",","targetDelimiter":",","stripBom":true,"unescapeStrayQuotes":true,"quoteFields":true,"normalizeLineEndings":true,"dropEmptyLines":true,"trimCells":false,"detectMixedDelimiters":true,"useAiRepair":false,"outputCsv":true}'以 JSON 形式 POST 提交输入参数。文件类型参数需先单独上传。
POST https://api.elysiatools.com/zh/api/tools/csv-malformed-row-surgeon| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| csvInput | textarea | 是 | — |
| delimiter | select | 否 | — |
| targetDelimiter | select | 否 | — |
| stripBom | checkbox | 否 | — |
| unescapeStrayQuotes | checkbox | 否 | — |
| quoteFields | checkbox |
将此工具加入你的 Model Context Protocol 服务,让 AI 智能体可以列出并调用它。
将以下内容加入你的 MCP 客户端配置:
{
"mcpServers": {
"elysiatools-csv-malformed-row-surgeon": {
"name": "csv-malformed-row-surgeon",
"description": "逐行外科手术式修复畸形 CSV 行:未转义(游离)引号、混合分隔符(同一文件中制表符/分号/逗号混用)、带 BOM 的表头、CRLF/CR 换行符与多余空行。外科医生采用容错解析,以红绿逐行 diff 显示每一处改动(前 → 后,并标注修复原因),列出未改动的行,并输出清洗后的 CSV。可选 AI 修复会在确定性修复后复查可疑行。它补足 CSV 校验器(仅报告问题)——真正修复受损行。",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=csv-malformed-row-surgeon",
"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-malformed-row-surgeon",
"arguments": {
"csvInput": "id,name,note\r\n1,Ada,\"loves, commas\"\r\n2,Grace\" Hopper,unescaped quote\r\n3\tLinus\ttab row\r\n",
"delimiter": ",",
"targetDelimiter": ",",
"stripBom": true,
"unescapeStrayQuotes": true,
"quoteFields": true,
"normalizeLineEndings": true,
"dropEmptyLines": true,
"trimCells": false,
"detectMixedDelimiters": true,
"useAiRepair": false,
"outputCsv": true
}
}
}有问题或反馈?请联系 [email protected]
| 否 |
| — |
| normalizeLineEndings | checkbox | 否 | — |
| dropEmptyLines | checkbox | 否 | — |
| trimCells | checkbox | 否 | — |
| detectMixedDelimiters | checkbox | 否 | — |
| useAiRepair | checkbox | 否 | — |
| outputCsv | checkbox | 否 | — |
HTML 结果
{
"result": "<div>Processed HTML content</div>",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}