Skip to main content
Glama

Calculate postage

calculate-postage
Read-onlyIdempotent

Calculates Sri Lanka Post postage for a weight, in LKR. Without a destination it prices every local service (ordinary letter, open article, parcel, speed post, logi post). With a destination country it prices every international airmail and sea mail service, with optional extras such as registration, and lists current notices for that country. Services that cannot carry the weight are left out. For cash on delivery fees use calculate-cod-fee instead.

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": {
      "weight_grams": "<weight_grams>"
    },
    "name": "calculate-postage"
  }
}

Input Schema

NameRequiredDescriptionDefault
weight_gramsYesWeight of the item in grams, e.g. 750 for 750 g.
destination_countryNoDestination country as an English name ("Japan") or two-letter ISO code ("JP"). Leave out to price local postage within Sri Lanka.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, openWorldHint=false, and destructiveHint=false, so the safety profile is covered. The description still adds meaningful behavior beyond the annotations: unavailable services are silently filtered out when they cannot carry the weight, and international calls also return current notices for the destination country. What it doesn't cover is output shape or whether a failed lookup errors versus returns empty.

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?

Four sentences, each front-loading the most decision-relevant fact: currency and unit, the local mode, the international mode, then the sibling redirect. No repetition of the title or the schema, and the exclusion of over-weight services is a single tight clause.

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?

With no output schema, the description carries the burden of telling the agent what comes back, and it does: a full list of priced services for the applicable mode plus country notices, in LKR, excluding services that cannot carry the weight. For a two-parameter, read-only lookup that is complete enough to call and interpret 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?

Schema coverage is 100% and both parameters are described, so the baseline would be 3. The description earns a step above by explaining the cross-parameter interaction: destination_country is effectively a mode switch, not just a filter, and it also notes that extras such as registration apply on the international path. The one weakness is that no parameter exists for those 'optional extras', leaving slightly ambiguous how an agent requests registration.

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?

States a specific verb and resource ('Calculates Sri Lanka Post postage') and immediately defines the two operating modes the tool has: local pricing when destination is omitted, international airmail/sea mail pricing when it is supplied. This lets an agent distinguish it from calculate-cod-fee, check-prohibited-articles, and find-post-office without opening 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?

The description explicitly conditions behavior on the presence or absence of destination_country, and it names the alternative it is not ('For cash on delivery fees use calculate-cod-fee instead') with the precise condition that selects it. Nothing about when to choose this tool over a sibling 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.

Resources