Calculate freight margin
calculate_marginMargin on a load from the buy rate (carrier cost) and sell rate (what the shipper pays): margin in dollars and percent of sell, the per-mile spread when miles are given, and the sell price needed to hit a target margin. Pure arithmetic; does not count toward the allowance.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"buy": "<buy>",
"sell": "<sell>",
"miles": "<miles>",
"target_margin_pct": "<target_margin_pct>"
},
"name": "calculate_margin"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| buy | Yes | Carrier cost (buy rate) for the load, all-in, in dollars. | |
| sell | Yes | Shipper price (sell rate) for the load, all-in, in dollars. | |
| miles | Yes | Loaded miles, or null. | |
| target_margin_pct | Yes | Target margin as a percent of sell, e.g. 15, or null. |