Skip to main content
Glama

Moltline Shipping Maths

Rate Card

rate_card
Read-onlyIdempotent

Turn a cost model into a customer-facing weight-banded price table. PREMIUM (license).

Prices each band at its upper bound so you never under-charge inside a band, then rounds up to a tidy increment. Typical input {"base_cost": 4.2, "cost_per_lb": 0.65, "bands_lb": [1, 2, 5, 10], "margin_pct": 25} returns {"bands": [{"up_to_lb": 1, "cost": 4.85, "price": 6.5}, ...], "over_top_band": "quote individually"}.

Use when publishing shipping prices customers pay. Not for the cut-off at which shipping becomes free: that is free_shipping_threshold. Errors: on invalid, missing, or malformed input this tool never raises a protocol error; it returns {"error": ""} (for example {"error": "bands_lb must contain at least one upper bound"}). Every call is read-only and idempotent, so after correcting the input it is always safe to retry.

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": {
      "base_cost": "<base_cost>",
      "cost_per_lb": "<cost_per_lb>",
      "bands_lb": "<bands_lb>"
    },
    "name": "rate_card"
  }
}

Input Schema

NameRequiredDescriptionDefault
bands_lbYesUpper weight bound of each band in ascending order, e.g. [1, 2, 5, 10]. At least one band, each greater than 0.
round_toNoIncrement to round each published price up to, e.g. 0.5 or 1. Default 0.5.
base_costYesFixed cost per shipment before weight, e.g. pick, pack and label. Must be greater than 0.
margin_pctNoMargin added on top of cost, e.g. 25 for 25%. Default 0.
cost_per_lbYesMarginal cost per pound. Use 0 for a flat rate card.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, yet the description still adds real behavioral content: prices are computed at each band's upper bound so in-band under-charging is impossible, results round up to a tidy increment, and every call is safe to retry. It also discloses the error contract — invalid input never raises a protocol error but returns an {"error": ...} object — which annotations cannot convey.

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

Conciseness4/5

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

The purpose and sibling boundary are front-loaded, followed by a compact input/output example and an error contract — every sentence carries information. The only slack is the stray 'PREMIUM (license).' tier marker, which adds no guidance for an agent.

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?

The tool has an output schema, so return values need no prose, yet the description still shows the result shape and the over_top_band policy. Combined with the error-handling paragraph and the retry guarantee, an agent has everything needed to call it correctly and recover from bad input.

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%, so the baseline is 3, but the worked example shows how base_cost, cost_per_lb, bands_lb and margin_pct combine and what over_top_band means, adding meaning beyond the per-field docs. It stops short of explaining round_to's interaction with margin, so it lands at 4 rather than 5.

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?

The first sentence states a specific verb and resource — turning a cost model into a customer-facing weight-banded price table — and the description immediately marks the boundary against a named sibling (free_shipping_threshold). An agent can distinguish this from dim_weight, freight_class, and landed_cost without inspecting any schema.

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?

It gives an explicit when (publishing the shipping prices customers actually pay) and an explicit when-not, routing the free-shipping cut-off case to the free_shipping_threshold sibling by name. Nothing about tool selection is left to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.