Skip to main content
Glama

create_parcel

Idempotent

Books and dispatches physical parcel consignments across Bangladesh through multiple courier services, with invoice idempotency and optional dry-run validation before creating a billable shipment.

Instructions

Book and dispatch a physical parcel consignment across Bangladesh through Steadfast, Pathao, RedX, Paperfly, or AI smart cascading routing, with built-in per-tenant invoice idempotency and optional dry-run validation. STATE-MUTATING ACTION (unless dry_run=true): Creates a real, billable shipment record in the carrier's production database, assigns an official tracking code, and deducts courier fees upon pickup. Set dry_run=true to validate recipient phone/address and preview the target courier and estimated BDT cost without booking upstream. Once booked, cancellations require direct courier portal operations ('cancellable_via_api: false').

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": {
      "invoice": "<invoice>",
      "recipient_name": "<recipient_name>",
      "recipient_phone": "<recipient_phone>",
      "recipient_address": "<recipient_address>",
      "cod_amount": "<cod_amount>"
    },
    "name": "create_parcel"
  }
}

Input Schema

NameRequiredDescriptionDefault
noteNoSpecial instructions for delivery rider
valueNoDeclared parcel value in BDT (used by RedX; defaults to the COD amount)
courierNoTarget courier or 'auto' for AI smart routing (default: auto)
dry_runNoIf true, validates phone/address and returns would_book_with and estimated_cost_bdt without creating a real upstream shipment.
invoiceYesUnique order invoice number (e.g. INV-1002) used as idempotency key
item_typeNoWhat's inside the parcel (used by RedX)
cod_amountYesCash on delivery amount in BDT (0 if prepaid)
item_weightNoParcel weight in KG (default: 0.5)
recipient_nameYesCustomer full name
pickup_store_idNoRedX only: your pickup store id (optional)
recipient_phoneYes11-digit Bangladeshi mobile number (e.g. 017XXXXXXXX)
delivery_area_idNoRedX only: numeric delivery-area id (auto-resolved from the address if omitted)
recipient_addressYesDelivery address (Thana, District, Street)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv2.5.5
    • changedInput schema / properties / courier / enum
      Previous value: -[
      -  "steadfast",
      -  "pathao",
      -  "redx",
      -  "paperfly",
      -  "auto"
      -]New value: +[
      +  "steadfast",
      +  "pathao",
      +  "redx",
      +  "paperfly",
      +  "auto",
      +  "auto_fastest",
      +  "auto_cheapest"
      +]
    • addedInput schema / properties / dry_run
      Added value: +{
      +  "description": "If true, validates phone/address and returns would_book_with and estimated_cost_bdt without creating a real upstream shipment.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / invoice / description
      Previous value: -"Unique order invoice number (e.g. INV-1002)"New value: +"Unique order invoice number (e.g. INV-1002) used as idempotency key"
  2. Changed24 schema fields changedv2.4.0
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / codAmount
      Removed value: -{
      -  "description": "Cash-on-delivery amount in BDT (0 = prepaid).",
      -  "minimum": 0,
      -  "type": "number"
      -}
    • addedInput schema / properties / cod_amount
      Added value: +{
      +  "description": "Cash on delivery amount in BDT (0 if prepaid)",
      +  "type": "number"
      +}
    • removedInput schema / properties / courier / default
      Removed value: -"steadfast"
    • changedInput schema / properties / courier / description
      Previous value: -"Which courier to book with."New value: +"Target courier or 'auto' for AI smart routing (default: auto)"
    • changedInput schema / properties / courier / enum
      Previous value: -[
      -  "steadfast",
      -  "pathao",
      -  "redx",
      -  "paperfly"
      -]New value: +[
      +  "steadfast",
      +  "pathao",
      +  "redx",
      +  "paperfly",
      +  "auto"
      +]
    • addedInput schema / properties / delivery_area_id
      Added value: +{
      +  "description": "RedX only: numeric delivery-area id (auto-resolved from the address if omitted)",
      +  "type": "number"
      +}
    • changedInput schema / properties / invoice / description
      Previous value: -"Your unique order/invoice id (idempotency key)."New value: +"Unique order invoice number (e.g. INV-1002)"
    • removedInput schema / properties / invoice / minLength
      Removed value: -1
    • removedInput schema / properties / itemDescription
      Removed value: -{
      -  "type": "string"
      -}
    • addedInput schema / properties / item_type
      Added value: +{
      +  "description": "What's inside the parcel (used by RedX)",
      +  "type": "string"
      +}
    • addedInput schema / properties / item_weight
      Added value: +{
      +  "description": "Parcel weight in KG (default: 0.5)",
      +  "type": "number"
      +}
    • removedInput schema / properties / meta
      Removed value: -{
      -  "additionalProperties": {},
      -  "description": "Courier-specific extras. Pathao: { storeId, cityId, zoneId, areaId }.",
      -  "type": "object"
      -}
    • addedInput schema / properties / note / description
      Added value: +"Special instructions for delivery rider"
    • addedInput schema / properties / pickup_store_id
      Added value: +{
      +  "description": "RedX only: your pickup store id (optional)",
      +  "type": "number"
      +}
    • removedInput schema / properties / recipientAddress
      Removed value: -{
      -  "minLength": 1,
      -  "type": "string"
      -}
    • removedInput schema / properties / recipientName
      Removed value: -{
      -  "minLength": 1,
      -  "type": "string"
      -}
    • removedInput schema / properties / recipientPhone
      Removed value: -{
      -  "pattern": "^01\\d{9}$",
      -  "type": "string"
      -}
    • addedInput schema / properties / recipient_address
      Added value: +{
      +  "description": "Delivery address (Thana, District, Street)",
      +  "type": "string"
      +}
    • addedInput schema / properties / recipient_name
      Added value: +{
      +  "description": "Customer full name",
      +  "type": "string"
      +}
    • addedInput schema / properties / recipient_phone
      Added value: +{
      +  "description": "11-digit Bangladeshi mobile number (e.g. 017XXXXXXXX)",
      +  "type": "string"
      +}
    • addedInput schema / properties / value
      Added value: +{
      +  "description": "Declared parcel value in BDT (used by RedX; defaults to the COD amount)",
      +  "type": "number"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "invoice",
      -  "recipientName",
      -  "recipientPhone",
      -  "recipientAddress",
      -  "codAmount"
      -]New value: +[
      +  "invoice",
      +  "recipient_name",
      +  "recipient_phone",
      +  "recipient_address",
      +  "cod_amount"
      +]
  3. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses that a real billable record is created in the carrier's production database, an official tracking code is assigned, courier fees are deducted upon pickup, and cancellations are impossible via API ('cancellable_via_api: false'). These are material side effects an agent could not infer from readOnlyHint=false / destructiveHint=false alone.

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?

Front-loads the capability, then the mutation warning, then the dry-run escape hatch and the cancellation caveat — a logical order. It is dense with two long sentences, but each clause carries operational meaning rather than filler.

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?

For a 13-parameter mutation with no output schema, it covers the critical gaps: side effects, billing, idempotency, dry-run preview fields, and irreversibility of cancellation. It stops short of describing error behavior (e.g. invalid phone or address rejection) and the exact success payload shape, which would be the remaining useful additions.

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 every parameter including invoice, dry_run, and the courier enum is already documented. The description adds only light context — per-tenant idempotency framing for invoice and the notion of cascading auto-routing — so the baseline of 3 applies.

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 ('Book and dispatch a physical parcel consignment') plus the supported couriers and routing modes, so an agent knows exactly what the tool does. The single-parcel framing also implicitly distinguishes it from the sibling bulk_create_parcels.

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?

Explicitly explains the dry_run=true path for validation-only previews versus real booking, and warns that post-booking cancellations must happen in the courier portal. It does not directly say when to prefer this over bulk_create_parcels or update_parcel, but the context needed to choose between booking and validating is clear.

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