Calculator
把真实最终价格拆成逐行瀑布:叠加折扣、正确的税基与税级联、礼仪基准小费与取整、多人分摊,以及中间价 vs DCC 转换对比。
用三种语言从你的代码中调用此工具。
curl -X POST 'http://127.0.0.1:3003/zh/api/tools/tip-sales-tax-currency-conversion-discount-stacking-calculator' \
-H 'Content-Type: application/json' \
-d '{"subtotal":85,"discountLines":"20%","stackingModel":"sequential","taxBase":"after-discounts","taxLines":"State=6.5\nCity=0.5","taxModel":"additive","tipPct":20,"tipBase":"pre-tax-post-discount","tipRounding":"nearest-0.05","partySize":2,"originalCcy":"USD","targetCcy":"CNY","fxRate":7.25,"dccMarkupPct":3.5,"issuerFeePct":1}'以 JSON 形式 POST 提交输入参数。文件类型参数需先单独上传。
POST http://127.0.0.1:3003/zh/api/tools/tip-sales-tax-currency-conversion-discount-stacking-calculator| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| subtotal | number | 是 | — |
| discountLines | textarea | 否 | — |
| stackingModel | select | 否 | — |
| taxBase | select | 否 | — |
| taxLines | textarea | 否 | — |
| taxModel | select |
将此工具加入你的 Model Context Protocol 服务,让 AI 智能体可以列出并调用它。
将以下内容加入你的 MCP 客户端配置:
{
"mcpServers": {
"elysiatools-tip-sales-tax-currency-conversion-discount-stacking-calculator": {
"name": "tip-sales-tax-currency-conversion-discount-stacking-calculator",
"description": "把真实最终价格拆成逐行瀑布:叠加折扣、正确的税基与税级联、礼仪基准小费与取整、多人分摊,以及中间价 vs DCC 转换对比。",
"baseUrl": "http://127.0.0.1:3003/mcp/sse?toolId=tip-sales-tax-currency-conversion-discount-stacking-calculator",
"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": "tip-sales-tax-currency-conversion-discount-stacking-calculator",
"arguments": {
"subtotal": 85,
"discountLines": "20%",
"stackingModel": "sequential",
"taxBase": "after-discounts",
"taxLines": "State=6.5\nCity=0.5",
"taxModel": "additive",
"tipPct": 20,
"tipBase": "pre-tax-post-discount",
"tipRounding": "nearest-0.05",
"partySize": 2,
"originalCcy": "USD",
"targetCcy": "CNY",
"fxRate": 7.25,
"dccMarkupPct": 3.5,
"issuerFeePct": 1
}
}
}有问题或反馈?请联系 [email protected]
| 否 |
| — |
| tipPct | number | 否 | — |
| tipBase | select | 否 | — |
| tipRounding | select | 否 | — |
| partySize | number | 否 | — |
| originalCcy | text | 否 | — |
| targetCcy | text | 否 | — |
| fxRate | number | 否 | — |
| dccMarkupPct | number | 否 | — |
| issuerFeePct | number | 否 | — |
HTML 结果
{
"result": "<div>Processed HTML content</div>",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}