Finance
Calculate credit card cash back rewards across multiple spending categories. Enter categories as 'name, monthly spend $, cash back %' per line. Shows monthly and annual cash back per category, total rewards, effective cash-back rate, and a comparison against a flat-rate card.
Call this tool from your code in three languages.
curl -X POST 'https://api.elysiatools.com/en/api/tools/cash-back-calculator' \
-H 'Content-Type: application/json' \
-d '{"categories":"Groceries, 600, 6\nGas, 200, 5\nDining, 300, 4\nOther, 800, 1","flatRate":2,"annualFee":95,"decimalPlaces":2}'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/cash-back-calculator| Name | Type | Required | Description |
|---|---|---|---|
| categories | textarea | Yes | — |
| flatRate | number | No | — |
| annualFee | number | No | — |
| decimalPlaces | number | No | — |
HTML result
{
"result": "<div>Processed HTML content</div>",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}Add this tool to your Model Context Protocol server so AI agents can list and call it.
Add this block to your MCP client configuration:
{
"mcpServers": {
"elysiatools-cash-back-calculator": {
"name": "cash-back-calculator",
"description": "Calculate credit card cash back rewards across multiple spending categories. Enter categories as 'name, monthly spend $, cash back %' per line. Shows monthly and annual cash back per category, total rewards, effective cash-back rate, and a comparison against a flat-rate card.",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=cash-back-calculator",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}After connecting to the SSE endpoint, list the exposed tools:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoke the tool by its id, passing arguments built from its parameters:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "cash-back-calculator",
"arguments": {
"categories": "Groceries, 600, 6\nGas, 200, 5\nDining, 300, 4\nOther, 800, 1",
"flatRate": 2,
"annualFee": 95,
"decimalPlaces": 2
}
}
}Questions or issues? Contact [email protected]