Calculator
Собирает реальную итоговую цену в виде водопада: стек скидок, корректная база и каскад налогов, чаевые на этикетной базе с округлением, деление на человеков и конвертация по среднерыночному курсу против DCC.
Вызовите этот инструмент из своего кода на трёх языках.
curl -X POST 'http://127.0.0.1:3003/ru/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}'Отправьте POST-запрос с входными данными в JSON. Параметры типа «файл» требуют предварительной загрузки.
POST http://127.0.0.1:3003/ru/api/tools/tip-sales-tax-currency-conversion-discount-stacking-calculator| Имя | Тип | Обязательный | Описание |
|---|---|---|---|
| subtotal | number | Да | — |
| discountLines | textarea | Нет | — |
| stackingModel | select | Нет | — |
| taxBase | select | Нет | — |
| taxLines | textarea | Нет | — |
| taxModel |
| select |
| Нет |
| — |
| 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"
}
}Добавьте этот инструмент на свой сервер Model Context Protocol, чтобы ИИ-агенты могли перечислять и вызывать его.
Добавьте этот блок в конфигурацию вашего MCP-клиента:
{
"mcpServers": {
"elysiatools-tip-sales-tax-currency-conversion-discount-stacking-calculator": {
"name": "tip-sales-tax-currency-conversion-discount-stacking-calculator",
"description": "Собирает реальную итоговую цену в виде водопада: стек скидок, корректная база и каскад налогов, чаевые на этикетной базе с округлением, деление на человеков и конвертация по среднерыночному курсу против 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-endpoint выведите список доступных инструментов:
{
"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]