Skip to main content
Glama

calculate_delivery_zone_and_fee

Read-onlyIdempotent

Estimate delivery zone, road distance, fee, SLA hours, and COD percentage for a single destination using the unified courier tariff table.

Instructions

Calculate standard delivery zone (inside_dhaka <=22km ৳80, sub_dhaka 22-45km ৳100, outside_dhaka >45km ৳150), road distance via Google Maps Platform Routes API, structured SLA hours ({min, max}), and applicable COD percentage for a single delivery destination using the unified tariff table (meta.source='static_tariff'). READ-ONLY ESTIMATION TOOL.

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": {
      "recipient_address": "<recipient_address>"
    },
    "name": "calculate_delivery_zone_and_fee"
  }
}

Input Schema

NameRequiredDescriptionDefault
weight_kgNoParcel weight in KG (default: 0.5)
origin_addressNoOptional merchant warehouse address (defaults to Dhaka Central Hub)
recipient_addressYesDelivery destination address

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.4.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and openWorldHint, so the safety profile is covered; the description still adds real value by disclosing the tariff tiers with distance bands and prices, the dependency on Google Maps Platform Routes API, and the meta.source='static_tariff' basis. It does not state what happens when an address cannot be geocoded or routed, which is the main residual gap.

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?

A single front-loaded sentence that packs the tariff table, routing provider, SLA shape, and data source without filler, followed by a short all-caps safety marker. The parenthetical tier list is dense but every element earns its place; the all-caps tag is slightly redundant given the annotations.

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

Completeness4/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 usefully characterizes the return payload (zone, fee, road distance, SLA {min, max}, COD percentage), which is exactly what an agent needs to interpret results. It is nearly complete for a read-only estimation tool; only failure/edge-case behavior for unresolvable addresses is missing.

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

Parameters3/5

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

Schema description coverage is 100%, so all three parameters are already documented in the schema. The description adds only the destination-scoping context and does not explain how weight_kg or origin_address affect the computed fee, so it stays at the baseline for a fully covered schema.

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 (calculate) and precisely enumerates what it computes: delivery zone, road distance, SLA hours, and COD percentage for a single destination. The phrase 'single delivery destination' implicitly separates it from bulk operations, and the tariff-table reference makes the computation model unambiguous.

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

Usage Guidelines3/5

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

The 'READ-ONLY ESTIMATION TOOL' label and 'single delivery destination' framing imply it is for quoting one shipment before creating a parcel, but no explicit when-to-use or when-not guidance is given, and no sibling (e.g., compare_courier_rates or create_parcel) is named as the alternative.

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