Skip to main content
Glama
Zenskar MCP Server

Zenskar MCP Server

Official
by zenskar

createPayment

createPayment

Record manual or offline payments or tax-withheld amounts, allocate them to invoices, and mark covered invoices as paid with successful payment records.

Instructions

Record a successful manual/offline payment or tax-withheld amount, equivalent to the frontend Add Payment flow. Link to invoices via payment_parts array. Use type='payment' with payment_method='bank_transfer', 'check', 'cash', or 'card'. Use type='tax_withheld' without payment_method. Always use status='success'. Do not use status='created' for manually recorded payments; created payments are unrealized and will not reduce invoice amount_due or mark invoices paid. The backend assigns the payment timestamp when the payment is recorded. Refunds, authorizations, reversals, payment links, and gateway charge attempts are outside this tool's scope.

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": {
      "amount": "<amount>",
      "currency_code": "<currency_code>"
    },
    "name": "createPayment"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeNoFrontend Add Payment type. Use 'payment' for a manual/offline payment, or 'tax_withheld' for a tax withheld amount. Refunds, payment reversals, and authorizations are outside this tool's scope.payment
amountYesTotal payment amount in cents. Invoice amounts are in major units, so multiply them by 100.
statusNoPayment status for this recorded payment. Use 'success' for manually recorded/offline payments so linked invoices are marked paid when payment_parts cover the amount due.success
customer_idNoUUID of the customer making the payment.
external_idNoExternal reference ID for this payment.
__userContextNoInternal user context for multi-tenant authentication and approval workflow
currency_codeYesThree-letter ISO 4217 currency code (e.g. USD).
payment_partsNoArray of invoice allocations. Each element: {invoice_id: 'UUID', amount: 10000}, with amount in cents. Links the payment to one or more invoices.
payment_methodNoManual payment method. Required when type='payment'; omit for type='tax_withheld'. Supported values match the frontend Add Payment flow.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.4.2
    • changedInput schema / properties / amount / description
      Previous value: -"Total payment amount in the smallest currency unit (e.g. cents)."New value: +"Total payment amount in cents. Invoice amounts are in major units, so multiply them by 100."
    • changedInput schema / properties / payment_parts / description
      Previous value: -"Array of invoice allocations. Each element: {invoice_id: 'UUID', amount: 10000}. Links the payment to one or more invoices."New value: +"Array of invoice allocations. Each element: {invoice_id: 'UUID', amount: 10000}, with amount in cents. Links the payment to one or more invoices."
  2. First observedv2.2.4

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden and does well: it explains that status='created' payments are unrealized, do not reduce invoice amount_due, and do not mark invoices paid. It also discloses that the backend assigns the payment timestamp and that invoice linkage happens through payment_parts. It does not cover permissions, idempotency, duplicate-payment behavior, or error handling, which keeps it from a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded and tightly structured: it states the core operation, then the conditional type/payment_method rules, then the critical status caveat, then the timestamp behavior, then exclusions. Each sentence adds operational guidance or scope clarification without unnecessary 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 nine-parameter mutation with no annotations and no output schema, the description covers purpose, conditional invocation rules, the key side effect on invoice amount_due/paid status, timestamp assignment, and scope exclusions. It does not describe the return value or error behavior, which leaves a modest gap given the absence of an output schema.

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 the schema already defines all nine parameters, including amount in cents, currency_code, payment_parts allocation shape, and the conditional payment_method requirement. The description reinforces the critical type/payment_method/status combinations, but most of that meaning is already present in the schema, so the baseline 3 is appropriate.

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?

The description opens with a specific verb and resource: 'Record a successful manual/offline payment or tax-withheld amount.' It distinguishes this tool from related operations by stating that refunds, authorizations, reversals, payment links, and gateway charge attempts are outside scope, so an agent can identify the intended operation without inspecting siblings.

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?

The description gives explicit usage conditions: use type='payment' with a manual payment_method, or type='tax_withheld' without one. It also states when not to use the tool by excluding refunds, authorizations, reversals, payment links, and gateway charge attempts, and it warns against status='created' for manually recorded payments.

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