Skip to main content
Glama
Payware MCP Server

Payware MCP Server

Official
by payware

payware_products_update_product

DestructiveIdempotent

Updates an existing product by changing only the fields you provide and keeping omitted values unchanged, including active-period and currency validation.

Instructions

[Merchant] Update an existing product. Only provide the fields you want to change: payware keeps every stored value the request leaves out. With neither activeFrom nor activeTo the active period stays as stored; with one of them the other is worked out as on create (activeFrom alone: the period runs one year from it; activeTo alone: it starts one year before activeTo, or today if that is later), and a start before today is refused (ERR_INVALID_ACTIVE_FROM_DATE).

Product Structure: šŸ“¦ PRODUCT METADATA: name, shortDescription, longDescription, sku, upc, shippable, active, shop šŸ’° PRODUCT DATA (prData object): type, regularPrice, currency, overlapPriority, timeToLive, activeFrom, activeTo, timeZone āš™ļø PRODUCT OPTIONS (prOptions object): imageUrl, termsUrl, termsText

Changing currency of a product with delivery settings is refused, and nothing changes, rather than quietly changing what delivery costs (VG 2026-11-15): 409 ERR_PRODUCT_CURRENCY_HAS_SURCHARGES while the product has delivery surcharges (they are amounts in its current currency: clear them with payware_products_set_delivery, keeping the exclusions, change the currency, then enter them again in the new one), checked first; and 409 ERR_NO_DELIVERY_IN_CURRENCY for a shippable product whose shop's delivery table has no rows in the new currency, which would leave it deliverable nowhere (add them with payware_shops_set_delivery first).

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": {
      "productId": "<productId>"
    },
    "name": "payware_products_update_product"
  }
}

Input Schema

NameRequiredDescriptionDefault
skuNoStock Keeping Unit (SKU)
upcNoUniversal Product Code (UPC)
nameNoProduct recognizable name
shopNoShop code
activeNoIndicates if product can serve as payment source
activeToNoProduct active state ending date (YYYY-MM-DD format)
currencyNoPrice currency (3-character ISO code)
imageUrlNoURL of the product image, fetched and checked by payware on save: JPG or PNG, at most 600 KB, at least 300 px wide and at most four times as wide as it is high (1200 x 630 px, about 300 KB, recommended). Banks, the payment page and chat previews show it.
termsUrlNoURL pointing to external terms and conditions resource
timeZoneNoProduct state scheduling timezone (IANA format, e.g., 'Europe/Sofia')
partnerIdNoMerchant partner ID (uses PAYWARE_PARTNER_ID env var as default)partner_12345
productIdYesProduct identifier to update (starts with 'pr')
shippableNoIndicates if product requires delivery address
termsTextNoTerms and conditions text
activeFromNoProduct active state starting date (YYYY-MM-DD format)
privateKeyNoRSA private key for authentication (uses environment-specific private key as default)
timeToLiveNoTime allowed for product payment in seconds (60-2592000)
useSandboxNoUse sandbox environment
productTypeNoType of product
regularPriceNoProduct regular price as a decimal string. Zero or positive, at most 12 integer digits, and no more decimals than the currency's minor unit (0 for JPY, 2 for EUR, 3 for KWD, 8 for BTC). Returned as a string too.
longDescriptionNoLong product description
overlapPriorityNoPriority when overlapping price schedules exist
shortDescriptionNoShort product description

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.6.1
    • changedInput schema / properties / imageUrl / description
      Previous value: -"URL pointing to external product image resource"New value: +"URL of the product image, fetched and checked by payware on save: JPG or PNG, at most 600 KB, at least 300 px wide and at most four times as wide as it is high (1200 x 630 px, about 300 KB, recommended). Banks, the payment page and chat previews show it."
  2. First observedv2.2.0

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the annotations (destructive, idempotent, open-world), the description discloses merge semantics, the activeFrom/activeTo derivation algorithm including the today-fallback, that a start date before today is refused, and that a refused currency change leaves the product untouched ('nothing changes'). It also states error check ordering ('checked first') and exact error codes, which is behavior an agent cannot get from the annotations or schema.

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 most important semantics (partial update, date derivation, currency refusal) are front-loaded in the first two paragraphs, with error detail after. The PRODUCT METADATA/DATA/OPTIONS breakdown largely restates parameter names already documented at 100% coverage, which is organizational rather than load-bearing, but it is compact.

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?

For a 23-parameter destructive mutation with no output schema, the description covers the two things an agent would otherwise get wrong: which fields are optional in practice and how the active-period dates interact. Blocking preconditions for currency changes are spelled out with recovery steps in the right order.

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, but the description adds genuine meaning on top: the conditional interaction between activeFrom and activeTo (neither, one, or both) and the special constraints on `currency` when delivery surcharges exist. Those two parameters behave differently from a naive per-field patch, and the description is the only place that says so.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence gives a specific verb and resource ('Update an existing product') and immediately clarifies it is a partial update, not a replacement. The metadata block enumerates exactly which product fields fall in scope, which implicitly separates it from the airing/audio/schedule update siblings, though no sibling is named to sharpen that contrast.

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?

It states the core usage rule clearly (only send fields you want to change; everything else is preserved) and gives concrete conditions under which the call is refused, with the alternative tool to run first (`payware_products_set_delivery`, `payware_shops_set_delivery`). It does not explicitly say when to use `payware_products_create_product` instead, but the 'existing product' framing covers that.

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