Skip to main content
Glama
Payware MCP Server

Payware MCP Server

Official
by payware

payware_shops_set_delivery

DestructiveIdempotent

[Merchant] Replace a shop's whole delivery table. Whatever you do not send is removed, so read it first with payware_shops_get_delivery and send every row you want to keep. An empty countries list means "deliver anywhere, no fee".

Instructions

[Merchant] Replace a shop's whole delivery table. Whatever you do not send is removed, so read it first with payware_shops_get_delivery and send every row you want to keep. An empty countries list means "deliver anywhere, no fee".

Endpoint: PUT /shops/{shopCode}/delivery

Each row: country (ISO alpha-2), currency, fee and optionally freeAbove, all amounts decimal strings at the currency's payable scale (at most 15 significant and 15 integer digits). Rules: no two rows with the same country and currency, at most 250 rows, fee 0 or more, freeAbove above zero. A refusal is 400 ERR_INVALID_DELIVERY_COUNTRY, ERR_INVALID_DELIVERY_SETTINGS or ERR_INVALID_AMOUNT_LENGTH and nothing is saved.

Read the answer. It is the saved table and, when the table is not empty, undeliverableProducts (also on every read of the table, until resolved) (productId, name, currency): the shop's active shippable products whose currency has no row in it, so they can now be delivered nowhere. It is absent when there are none. The table is saved either way: tell the merchant, and add rows in those currencies if that was not the intent.

Needs a plan that can ship: Standard or Premium. A Basic (BSC) merchant is refused with 403 ERR_METHOD_NOT_ALLOWED_FOR_CURRENT_USER_PLAN. Changes are audit-logged.

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": {
      "shopCode": "<shopCode>",
      "countries": "<countries>"
    },
    "name": "payware_shops_set_delivery"
  }
}

Input Schema

NameRequiredDescriptionDefault
shopCodeYesThe shop code, from payware_shops_list
countriesYesThe complete table: one row per country and currency. Empty means deliver anywhere with no fee
useSandboxNoUse the sandbox (the default) rather than production

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.3.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag destructiveHint and idempotent, but the description goes well beyond them: it says whatever is not sent is removed, that an empty list means deliver anywhere with no fee, the exact validation rules (no duplicate country/currency, max 250 rows, fee >= 0, freeAbove > 0), and the 400 error codes with the guarantee that nothing is saved on refusal. It also discloses audit logging, plan gating with the specific 403 code, and the return payload including `undeliverableProducts` and the fact the table is saved even when that warning fires.

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?

Bold-lead plus short labeled sections (Endpoint, each row, Rules, Read the answer) make it easy to scan, and the destructive warning comes first. It is dense and a few clauses duplicate the schema (e.g. the amount pattern), so it is slightly longer than strictly necessary for the value added.

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?

There is no output schema, and the description compensates fully by explaining the returned table and the conditional `undeliverableProducts` field, including when it is absent and how to remedy it. For a destructive, plan-gated mutation, the definition covers preconditions, failure modes, data-loss behavior, and the response.

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%, so the baseline is 3, and the description adds real meaning on top: the uniqueness constraint pairing country with currency, the row cap, the amount-scale limits (at most 15 significant and 15 integer digits), and the consequence that a product is only deliverable where its own currency has a row. Some of this restates schema text (empty list semantics, decimal-string format), which keeps it from a 5.

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 — '**Replace** a shop's whole delivery table' — with the scope (whole table, not per-row) front-loaded and bolded. It also names the read sibling `payware_shops_get_delivery`, so an agent can separate this write from the corresponding read without opening either schema.

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 tells the agent to read the table first with `payware_shops_get_delivery` and to send every row it wants to keep, which is the key usage instruction for a replace operation. It also states the plan prerequisite (Standard or Premium, Basic refused with 403). It does not distinguish this shop-level table from the product-level `payware_products_set_delivery` sibling, which is a real ambiguity for an agent choosing between the two.

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

Deploy Server

Other Tools