Dimensional weight of a package
calculate_dim_weightDimensional (DIM) weight of one package in pounds and kilograms: length × width × height in inches, rounded as the service rules say, divided by that service divisor. service picks the carrier and rate (default ups-daily): ups-daily = UPS UPS packages, Daily Rates; ups-retail-domestic = UPS UPS domestic packages, Retail Rates; ups-retail-export = UPS UPS export packages, Retail Rates; fedex-packages = FedEx FedEx U.S. and international package services and Express Freight (not International Deferred Freight or One Rate); fedex-intl-deferred = FedEx FedEx International Deferred Freight; fedex-ground-economy = FedEx FedEx Ground Economy at 1 lb or more, including Bound Printed Matter, Media and Returns; usps-priority = USPS USPS Priority Mail, retail, to Zones 1-9. Services whose checked sources state no rounding rule are left unrounded. USPS retail Priority Mail applies dimensional weight only above its volume floor. Give actualWeight to compare it with the dimensional weight; this tool does not work out a charge.
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": {
"length": "<length>",
"width": "<width>",
"height": "<height>"
},
"name": "calculate_dim_weight"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unit | No | in | |
| width | Yes | Package width, in unit | |
| height | Yes | Package height, in unit | |
| length | Yes | Package length, in unit | |
| service | No | Carrier service id | ups-daily |
| actualWeight | No | Actual weight, in actualWeightUnit. Optional | |
| actualWeightUnit | No | lb |