Compare shipping rates
get_ratesShipping prices for one parcel between two postal codes from USPS, UPS and FedEx, cheapest first, with delivery days and surcharges. Each quote names its source and rateType (retail, list, or a postage reseller's price). Quotes only: nothing is bought and no label is made. Sources that can't quote come back in errors.
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": {
"from": "<from>",
"to": "<to>",
"weight": "<weight>"
},
"name": "get_rates"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Destination postal code, e.g. 10001 | |
| from | Yes | Origin postal code, e.g. 94107 | |
| width | No | ||
| height | No | ||
| length | No | Optional; give length, width and height together | |
| weight | Yes | Parcel weight, in weight_unit | |
| carriers | No | Only these carrier ids (see list_carriers). Omit for all. | |
| to_country | No | Destination country, two letters (default US) | |
| residential | No | Whether the destination is a home (default false) | |
| weight_unit | No | Default lb | |
| from_country | No | Origin country, two letters (default US) | |
| dimension_unit | No | Default in |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| errors | Yes | ||
| notice | No | ||
| quotes | Yes | ||
| fastest | No | ||
| cheapest | No | ||
| quotedAt | No | ||
| credits_remaining | No |