Skip to main content
Glama
SMKlog Parcel Shipping Rates

SMKlog Parcel Shipping Rates

Billable weight of a box

calculate_billable_weight
Read-onlyIdempotent

Calculate billable parcel weight by comparing dimensional and actual weight, applying USPS, UPS and FedEx rounding rules and checking carrier size and weight limits.

Instructions

The 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

NameRequiredDescriptionDefault
width_inYesBox width, inches
height_inYesBox height, inches
length_inYesBox length, inches
weight_lbYesPacked weight, pounds

Output Schema

NameRequiredDescriptionDefault
hintYesBox-size advice when the box bills 2 lb or more above its weight; else null
noteYesWhat decides: the carrier’s own measurement at acceptance
box_inYesSides rounded up to whole inches, longest first
limitsYes
carriersYesUSPS, UPS and FedEx, in that order
actual_weight_lbYesPacked weight sent, pounds
rounded_weight_lbYesPacked weight rounded up to a whole pound, at least 1
length_plus_girth_inYesLongest side plus twice the other two, sides rounded up

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.5.0

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly/idempotent/non-destructive, and the description adds real context beyond them: no live carrier call, nothing persisted, no quote allowance, and the per-carrier rounding and size-threshold rules that determine the result. The USPS 1728-cubic-inch threshold and the 70 lb/130 in vs. 108 in limits are exactly the behavioral details an agent would otherwise get wrong.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the one-line definition, then a short param-rules block and carrier-rule bullets. Dense but every clause carries a rule or constraint an agent needs; nothing is padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

A four-numeric-input, pure-computation tool with an output schema and full annotation coverage needs exactly this: what is computed, under which carrier rules, what limits apply, and what it does not do. Nothing material is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and each parameter is a plain dimension or weight, so baseline would be 3. The description adds interpretation the schema cannot: sides are rounded up for USPS vs. nearest inch for UPS/FedEx, the 139 divisor only applies above 1728 cubic inches, and weights round up to whole pounds with USPS pricing sub-pound by the ounce. Minor redundancy in restating required/above 0/at most 1000.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Starts with a precise verb+resource ('The weight USPS, UPS and FedEx bill for a box') and immediately names the computation (dimensional L x W x H / 139 vs. actual, rounded per carrier) plus the limit checks. It is unmistakably distinct from siblings like get_parcel_quote.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly bounds usage: 'A calculation only: no carrier call, no quote allowance, nothing stored' and routes to the alternative, 'get_parcel_quote prices the box live.' It also states the questions the tool answers (why a big light box costs more, how small a box would bill at real weight), so when-to-use and when-not-to-use are both covered.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.