Skip to main content
Glama

Create a Nova Poshta waybill for an order

np_create_waybill

Creates a Nova Poshta waybill (ТТН) for a store order: resolves the city and branch from the order, applies the sender and parcel defaults, adds cash on delivery for unpaid cash-on-delivery orders and writes the waybill number back to the order. When the city or branch is ambiguous it creates nothing and returns the candidates (status needs_choice).

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": {
      "order_ref": "<order_ref>"
    },
    "name": "np_create_waybill"
  }
}

Input Schema

NameRequiredDescriptionDefault
payerNoWho pays for delivery
seatsNoNumber of parcels (seats)
city_refNoCity Ref chosen among candidates
width_cmNo
height_cmNo
length_cmNo
order_refYesOrder reference from list_orders, e.g. prom:312874561
ship_dateNoShipping date YYYY-MM-DD; default today
weight_kgNoWeight; default from settings
cod_amountNoCash on delivery; 0 disables it
descriptionNoCargo description
connection_idNoNova Poshta connection id from list_connections; default: the main one
warehouse_refNoBranch/parcel-locker Ref chosen among candidates
declared_valueNoDeclared value; default = order total

Output Schema

NameRequiredDescriptionDefault
ttnNo
cityNo
demoNo
noteNo
planNo
statusYescreated | needs_choice | skipped | error
label_urlNo
order_refYes
warehouseNo
cod_amountNo
written_backNo
delivery_costNo
declared_valueNo
status_changedNo
write_back_noteNo
label_100x100_urlNo
estimated_delivery_dateNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, openWorldHint=true, and idempotentHint=false, so the description's job is to add beyond that — and it does: it discloses the side effect of writing the waybill number back to the order, the automatic COD insertion for unpaid COD orders, and the failure mode where nothing is created and candidates are returned. It stops short of warning that, given idempotentHint=false, a retry can create a duplicate waybill.

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-loaded with the verb and resource, and the ambiguity/needs_choice clause is placed last where it belongs. The single long sentence is dense but every clause carries operational information; only the parenthetical 'ТТН' could be trimmed.

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?

An output schema exists, so return values need no explanation, and annotations cover safety and openness. The description covers the workflow and the ambiguous-city branch, but for a 14-param, non-idempotent, external-API mutation it omits any note on duplicate risk on retry or on which connection is used when connection_id is absent.

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?

With 14 parameters at 79% schema coverage, the schema carries most field-level definitions, but the description adds real meaning: sender and parcel values come from defaults, city_ref/warehouse_ref are override-or-candidates inputs, and cod_amount behavior is tied to the order's unpaid COD state. It does not clarify payer semantics or how city_ref/warehouse_ref interact with the needs_choice flow beyond the one hint.

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 ('Creates a Nova Poshta waybill (ТТН) for a store order') and enumerates the concrete steps it performs: city/branch resolution, default application, COD addition, and write-back of the waybill number. The 'for a store order' scope plus the singular resource distinguishes it from the bulk sibling np_create_waybills_bulk without needing to name it.

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?

Usage is implied rather than stated: the agent can infer it must first have an order (order_ref from list_orders, per schema) and that an ambiguous city/branch returns candidates with status needs_choice, prompting a retry with city_ref/warehouse_ref. There is no explicit statement of when to prefer this over np_create_waybills_bulk or set_order_waybill, and no stated prerequisites such as a required Nova Poshta connection.

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