Skip to main content
Glama

kapruka_check_delivery

Read-only

Check whether Kapruka can deliver to a given city on a given date, and at what rate.

Returns the flat delivery rate (LKR), whether the requested date is available,
and — if not — the next available date plus reason. Kapruka delivers as a
single shipment per order at one flat rate regardless of item count.

If a `product_id` is supplied and the code matches a perishable family
(CAKE*, FLOWER*, COMBO*), an extra warning is added when the chosen
delivery date is more than 1 day out.

Args:
    params (CheckDeliveryInput):
        - city (str): Canonical city name (e.g. 'Colombo 03', 'Galle')
        - delivery_date (Optional[str]): YYYY-MM-DD; defaults to today (LK time)
        - product_id (Optional[str]): Optional, enables perishable warning
        - response_format (str): 'markdown' (default) or 'json'

Returns:
    str: Delivery feasibility + rate in the requested format.

    JSON schema:
    {
      "city": str,
      "now": str,                       # ISO timestamp, Sri Lanka time
      "checked_date": str,              # YYYY-MM-DD
      "available": bool,
      "rate": number,                   # flat LKR rate per order
      "currency": "LKR",
      "reason": str | null,             # populated when available=false
      "next_available_date": str|null,  # populated when available=false
      "perishable_warning": str | null  # populated when product_id is perishable
    }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

TDQS

A4.6/5.0
Behavior5/5

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

The description goes well beyond the annotations (readOnlyHint=true, destructiveHint=false). It discloses the flat-rate-per-order behavior ('single shipment per order at one flat rate regardless of item count'), the perishable warning logic, and the default date behavior ('defaults to today (LK time)'). It also details the exact JSON response schema, including null fields and conditions. With annotations already establishing safety, this extra context is valuable and non-redundant.

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 description is well-structured with clear 'Args' and 'Returns' sections, and the core purpose is front-loaded. It is slightly longer than necessary but every sentence adds useful detail—no filler. The JSON schema example is appropriately compact and aids comprehension.

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 description is highly complete given the tool's complexity. The output schema is fully explained, return fields are enumerated with conditions, perishable warning behavior is described, and defaults are specified. There is no ambiguity about the response format or edge cases. Sibling tools exist but do not create a need for more context here.

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 description's Args section explicitly lists and explains each parameter in plain language, complementing the schema which also has descriptions. It adds meaning beyond the schema by explaining the effect of product_id ('enables perishable warning') and the default behavior of delivery_date. The flat-rate note and perishable logic give real semantic depth beyond field names and types.

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+scope: 'Check whether Kapruka can deliver to a given city on a given date, and at what rate.' It clearly differentiates from sibling tools like kapruka_list_delivery_cities (which lists cities) and kapruka_create_order (which places orders). The purpose is unambiguous and immediately actionable.

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

Usage Guidelines4/5

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

The description provides clear context for when to use the tool (checking delivery feasibility and rate) and includes conditional usage guidance: 'If a product_id is supplied and the code matches a perishable family... the chosen delivery date is more than 1 day out.' It does not explicitly mention alternatives or exclusions, but the context is sufficient. A minor gap is not referencing sibling tools like kapruka_list_delivery_cities for city discovery, though the schema covers that.

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.7/5.0
Disambiguation5/5

Each tool targets a clearly distinct operation: delivery checking vs city listing, product search vs product fetch, order creation vs tracking, plus an auxiliary card renderer. Even the two delivery-related tools have non-overlapping purposes, and descriptions reinforce the boundary.

Naming Consistency5/5

All tools follow a consistent `kapruka_<verb>_<noun>` snake_case pattern (e.g., check_delivery, create_order, search_products). The verb-noun structure is uniform, making it easy to predict tool names.

Tool Count5/5

8 tools is well-scoped for an e-commerce MCP server, covering catalog browsing, delivery feasibility, order placement, and order tracking without unnecessary bloat. Each tool serves a distinct step in the shopping workflow.

Completeness5/5

The tool surface covers the full agent-visible lifecycle: discover products (search/get/categories), check delivery, create a guest order, and track post-payment status. There are no obvious dead ends for common shopping scenarios.