Math & Numbers
Estimate multi-segment trip fuel, cost, CO2, route-condition weighting, and carpool sharing.
Call this tool from your code in three languages.
curl -X POST 'https://api.elysiatools.com/en/api/tools/fuel-cost-trip-calculator' \
-H 'Content-Type: application/json' \
-d '{"distanceSegments":"120 highway\n80 mixed\n20 city","consumption":7,"fuelPrice":1.8,"currency":"USD","fuelType":"gasoline","passengers":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/fuel-cost-trip-calculator| Name | Type | Required | Description |
|---|---|---|---|
| distanceSegments | textarea | Yes | — |
| consumption | number | No | — |
| fuelPrice | number | No | — |
| currency | select | No | — |
| fuelType | select | No | — |
| passengers |
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-fuel-cost-trip-calculator": {
"name": "fuel-cost-trip-calculator",
"description": "Estimate multi-segment trip fuel, cost, CO2, route-condition weighting, and carpool sharing.",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=fuel-cost-trip-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": "fuel-cost-trip-calculator",
"arguments": {
"distanceSegments": "120 highway\n80 mixed\n20 city",
"consumption": 7,
"fuelPrice": 1.8,
"currency": "USD",
"fuelType": "gasoline",
"passengers": 2
}
}
}Questions or issues? Contact [email protected]
| number |
| No |
| — |
HTML result
{
"result": "<div>Processed HTML content</div>",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}