Text Processing
统一和清理文本中的各种数字格式,确保一致性
用三种语言从你的代码中调用此工具。
curl -X POST 'https://api.elysiatools.com/zh/api/tools/number-format-cleaner' \
-H 'Content-Type: application/json' \
-d '{"textInput":"在此输入或粘贴包含各种数字格式的文本...\n\n混合格式示例:\n1,234.56 和 1.234,56 和 1,234 和 1 234.56\n$1,234.56 和 €1,234,56 和 ¥1,234\n1234.56% 和 1.2% 和 1 234%\n1,234,567.89 和 1,234,567.89","targetFormat":"en_standard","customThousandsSep":"例如:逗号(,)或空格( )或点号(.)","customDecimalSep":"例如:点号(.)或逗号(,)","removeCurrencySymbols":true,"normalizeSpaces":true,"outputFormat":"cleaned"}'以 JSON 形式 POST 提交输入参数。文件类型参数需先单独上传。
POST https://api.elysiatools.com/zh/api/tools/number-format-cleaner| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| textInput | textarea | 是 | — |
| targetFormat | select | 是 | — |
| customThousandsSep | text | 否 | 仅在选择"自定义格式"时使用 |
| customDecimalSep | text | 否 | 仅在选择"自定义格式"时使用 |
| removeCurrencySymbols | checkbox | 否 | 从数字中移除所有货币符号 |
| normalizeSpaces |
将此工具加入你的 Model Context Protocol 服务,让 AI 智能体可以列出并调用它。
将以下内容加入你的 MCP 客户端配置:
{
"mcpServers": {
"elysiatools-number-format-cleaner": {
"name": "number-format-cleaner",
"description": "统一和清理文本中的各种数字格式,确保一致性",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=number-format-cleaner",
"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": "number-format-cleaner",
"arguments": {
"textInput": "在此输入或粘贴包含各种数字格式的文本...\n\n混合格式示例:\n1,234.56 和 1.234,56 和 1,234 和 1 234.56\n$1,234.56 和 €1,234,56 和 ¥1,234\n1234.56% 和 1.2% 和 1 234%\n1,234,567.89 和 1,234,567.89",
"targetFormat": "en_standard",
"customThousandsSep": "例如:逗号(,)或空格( )或点号(.)",
"customDecimalSep": "例如:点号(.)或逗号(,)",
"removeCurrencySymbols": true,
"normalizeSpaces": true,
"outputFormat": "cleaned"
}
}
}有问题或反馈?请联系 [email protected]
| checkbox |
| 否 |
| 移除数字内部的空格(1 234 → 1234) |
| outputFormat | select | 是 | — |
文本结果
{
"result": "Processed text content",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}