Billable weight of a box
calculate_billable_weightThe weight USPS, UPS and FedEx bill for a box: dimensional weight (L x W x H / 139) against actual weight, rounded as each carrier rounds, and the parcel and USPS limits it meets. Explains why a big light box costs more and how small a box would bill at its real weight. A calculation only: no carrier call, no quote allowance, nothing stored; get_parcel_quote prices the box live.
Parameter rules:
length_in, width_in, height_in, weight_lb: all required, above 0, at most 1000.
USPS: sides rounded up, 139 only above 1728 cubic inches; UPS and FedEx: nearest inch, every box.
Weights round up to a whole pound; USPS prices under 1 lb by the ounce.
Limits: parcel 150 lb, 108 in longest side, 165 in length plus girth; USPS 70 lb, 130 in (Ground Advantage) or 108 in (Priority Mail).
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_in": "<length_in>",
"width_in": "<width_in>",
"height_in": "<height_in>",
"weight_lb": "<weight_lb>"
},
"name": "calculate_billable_weight"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width_in | Yes | Box width, inches | |
| height_in | Yes | Box height, inches | |
| length_in | Yes | Box length, inches | |
| weight_lb | Yes | Packed weight, pounds |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hint | Yes | Box-size advice when the box bills 2 lb or more above its weight; else null | |
| note | Yes | What decides: the carrier’s own measurement at acceptance | |
| box_in | Yes | Sides rounded up to whole inches, longest first | |
| limits | Yes | ||
| carriers | Yes | USPS, UPS and FedEx, in that order | |
| actual_weight_lb | Yes | Packed weight sent, pounds | |
| rounded_weight_lb | Yes | Packed weight rounded up to a whole pound, at least 1 | |
| length_plus_girth_in | Yes | Longest side plus twice the other two, sides rounded up |