Skip to main content
Glama

xpayr_apply_payment_coupon

Validates a merchant discount coupon and applies it to an active pending payment session, then recalculates the effective crypto price.

Instructions

Validate and apply a merchant discount coupon code to an active pending payment session and recalculate the effective crypto price.

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": {
      "session_id": "<session_id>",
      "coupon_code": "<coupon_code>"
    },
    "name": "xpayr_apply_payment_coupon"
  }
}

Input Schema

NameRequiredDescriptionDefault
session_idYesTarget payment session ID.
coupon_codeYesDiscount coupon code to apply.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it does disclose that the code is validated before being applied and that the effective price is recalculated, which is useful behavioral context. It is silent on important traits for a mutation tool: what happens on an invalid or expired coupon, whether a previously applied coupon is replaced, idempotency, and reversibility.

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?

A single sentence with zero filler, front-loading the action and ending with the effect. Every clause (validate, apply, recalculate) earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter mutation with no output schema and no annotations, the description covers the core action but omits what the caller gets back (e.g., the new discounted price or updated session) and error behavior. Those omissions matter more here precisely because no output schema or annotations fill the gap.

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%, with both session_id and coupon_code documented in the schema, so the baseline is 3. The description adds no additional param-level detail such as coupon format or case sensitivity, so it neither compensates nor detracts.

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 description pairs specific verbs ('validate and apply') with a specific resource ('merchant discount coupon code') and names the side effect ('recalculate the effective crypto price'), so the agent knows exactly what the call does. It does not explicitly differentiate itself from siblings, but no sibling clearly overlaps with coupon handling, so the gap is minor.

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 only implied through the precondition 'to an active pending payment session', which tells the agent the session must be in a pending state, but there is no explicit when-to-use/when-not-to-use framing or mention of alternatives for pricing adjustments. Adequate but leaves the agent to infer the trigger conditions.

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