Skip to main content
Glama
Payware MCP Server

Payware MCP Server

Official
by payware

payware_poi_create_batch

Create up to 50 POIs for one shop in one atomic batch, ensuring terminal rollouts either fully succeed or fail without partial duplicates.

Instructions

[Merchant] Create up to 50 POIs in a single atomic call - the tool for rolling out a terminal estate.

Endpoint: POST /poi/batch -> 201 Created, returning { created, pois: [...] }

Atomic means all or nothing. Either every entry is created or none is. That is the reason to prefer this over a loop of payware_poi_create: a loop that fails on entry 27 leaves 26 POIs behind with nothing recording where it stopped, and re-running it duplicates them.

A POI belongs to a shop, and a shop belongs to a merchant. shopCode is required - use payware_shops_list to find one rather than guessing. Banks do not own POIs; a financial-institution principal gets 403 on every POI endpoint, not an empty result.

ttlSeconds is the price-session TTL, not the POI's lifetime. It bounds how long a price set on this POI stays claimable before the POI returns to IDLE. Range 60-600 seconds; the server defaults it to 300.

Defaults and overrides. shopCode, ttlSeconds and callbackUrl at the top level apply to every entry. An entry may override name, ttlSeconds and callbackUrl for itself. shopCode is top-level only - one batch builds one shop.

Limits: 1 to 50 entries. An empty list is ERR_BATCH_EMPTY; more than 50 is ERR_BATCH_TOO_LARGE. Both are refused locally before the request is sent. For a larger rollout, split it into batches of 50 - each batch is atomic on its own, so record which batches succeeded.

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>",
      "pois": "<pois>"
    },
    "name": "payware_poi_create_batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
poisYesThe POIs to create. Each entry may set name, ttlSeconds and callbackUrl; anything omitted falls back to the top-level value. An entry may be an empty object, which creates an unnamed POI with the batch defaults.
shopCodeYesCode of the shop every POI in this batch belongs to. Required, top-level only. Find one with payware_shops_list.
partnerIdNoPartner ID from the payware dashboard. Uses PAYWARE_PARTNER_ID env var as default.
privateKeyNoRSA private key for JWT signing. Uses the environment-specific key as default.
ttlSecondsNoDefault price-session TTL for every POI in the batch. Server default 300.
useSandboxNoUse sandbox environment for testing
callbackUrlNoDefault HTTPS callback URL for every POI in the batch.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.2.0

TDQS

A4.6/5.0
Behavior4/5

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

Beyond the annotations (which already declare mutation, open-world and non-idempotent), the description discloses atomic all-or-nothing semantics, the concrete endpoint and 201 response shape, the error codes ERR_BATCH_EMPTY and ERR_BATCH_TOO_LARGE with the fact they are refused client-side before sending, and the 403 bank restriction. Strong disclosure; the only missing piece is what a partially successful split rollout looks like in practice beyond 'record which batches succeeded'.

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 core claim ('atomic'), then layers rationale, constraints and limits in short bolded sections. Most sentences earn their place; the endpoint/status-code line is the one piece that could be trimmed since the response shape is stated separately and no output schema exists to justify it here.

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 7-parameter mutation with no output schema, the description covers everything an agent needs: limits and their error codes, atomicity and its failure implications, TTL semantics, override rules, required shopCode and its lookup tool, and batch-splitting guidance for larger rollouts.

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 real meaning the schema does not: ttlSeconds is a price-session TTL bounded at 60-600s after which the POI returns to IDLE, not the POI's lifetime. It also spells out the top-level-versus-per-entry override precedence and that shopCode is top-level only, one batch per shop.

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, resource and hard scope limit: 'Create up to 50 POIs in a single atomic call', and frames the estate-rollout use case. It explicitly contrasts itself with the sibling payware_poi_create loop, so an agent can pick between them 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 Guidelines5/5

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

Gives explicit when-to-use (rolling out a terminal estate, any multi-POI creation) and when-not (a loop of payware_poi_create is worse because a mid-loop failure strands partial state). It also routes the agent to payware_shops_list for shopCode instead of guessing, and names the 403 outcome for financial-institution principals.

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