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.

Input Schema

TableJSON 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

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, and non-destructive behavior, so the bar is lower. The description adds valuable non-obvious behavior: pricing at the upper bound, rounding up to a tidy increment, and returning an error object instead of raising a protocol error. This goes beyond the annotation metadata and gives the agent important expectations for error handling and retry safety.

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?

The description is long but every sentence earns its place: purpose, pricing behavior, example, usage guideline, sibling contrast, error behavior, and retry safety. It is well-structured with clear breaks between these concerns and contains no filler.

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?

Given the tool's complexity, the description covers purpose, usage, pricing algorithm, error behavior, idempotency, and a concrete example. An output schema exists, so return-value details need not be repeated. The contrast with free_shipping_threshold addresses the most likely sibling ambiguity. This is complete for an agent selecting and invoking the tool correctly.

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?

The input schema already provides 100% parameter descriptions, so the baseline is 3. The description adds a concrete input/output example that clarifies how base_cost, cost_per_lb, bands_lb, and margin_pct interact, and it explains the rounding behavior. This enriches the schema without duplicating it.

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 description opens with a specific verb+resource statement: 'Turn a cost model into a customer-facing weight-banded price table.' It clearly distinguishes itself from the sibling free_shipping_threshold by explicitly saying it is not for that cutoff, and the example input/output makes the tool's function concrete.

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?

The description gives explicit usage guidance: 'Use when publishing shipping prices customers pay' and directly contrasts with free_shipping_threshold as the alternative tool. This is exactly the kind of when-to-use vs. when-not-to-use guidance that helps an agent select the correct tool.

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.

TDQS

A4.8/5.0
Disambiguation5/5

Each tool serves a clearly distinct calculation: billable weight, free shipping break-even, freight class from density, landed cost, box selection, and rate card generation. The descriptions explicitly cross-reference which tool to use instead when there's potential overlap, eliminating ambiguity.

Naming Consistency4/5

Tool names follow a consistent lowercase snake_case style, but the pattern is mostly noun phrases (dim_weight, freight_class, rate_card) with one deviation (parcel_fit uses a noun+verb combo). This is minor and does not hinder readability.

Tool Count5/5

With 6 tools, the set is well-scoped for a shipping mathematics server. Each tool addresses a distinct functional need without redundancy, fitting comfortably in the ideal range.

Completeness5/5

The surface covers the core shipping calculations: dimensional weight, packaging selection, freight classification, landed cost, pricing thresholds, and rate tables. No obvious missing operations for the stated domain, especially given the read-only and idempotent nature of the tools.

Resources