Skip to main content
Glama
ghl-mcp-server-v2

ghl-mcp-server-v2

by zackscriven

ghl_payment_coupon_update

Idempotent

Modify existing coupon details such as discount values, validity periods, and usage limits to adjust or extend promotional offers.

Instructions

Update Coupon The "Update Coupon" API enables you to modify existing coupon details such as discount values, validity periods, usage limits, and other promotional parameters. Use this endpoint to adjust or extend promotional offers for your customers. Endpoint: PUT /payments/coupon (Version header: v3; source: v3/payments-v3.json) Requires a Sub-Account (location) token. OAuth scopes: payments/coupons.write

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": {
      "body": "<body>"
    },
    "name": "ghl_payment_coupon_update"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyYesRequest body (schema carried verbatim from the official OpenAPI spec).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.1.0
    • changedInput schema / properties / body / properties / applyToFuturePaymentsConfig / allOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "duration": {
      -        "description": "Duration the coupon to be applied in a subscription",
      -        "example": 5,
      -        "type": "number"
      -      },
      -      "durationType": {
      -        "description": "Type of the duration",
      -        "enum": [
      -          "months"
      -        ],
      -        "example": "months",
      -        "type": "string"
      -      },
      -      "type": {
      -        "description": "Type of the config",
      -        "enum": [
      -          "forever",
      -          "fixed"
      -        ],
      -        "example": "forever | fixed",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "duration",
      -      "durationType"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "duration": {
      +        "description": "Duration the coupon to be applied in a subscription",
      +        "example": 5,
      +        "type": "number"
      +      },
      +      "durationType": {
      +        "description": "Type of the duration",
      +        "enum": [
      +          "months"
      +        ],
      +        "example": "months",
      +        "type": "string"
      +      },
      +      "type": {
      +        "description": "Type of the config",
      +        "enum": [
      +          "forever",
      +          "fixed"
      +        ],
      +        "example": "forever | fixed",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "duration",
      +      "durationType"
      +    ],
      +    "title": "ApplyToFuturePaymentsConfig",
      +    "type": "object"
      +  }
      +]
    • addedInput schema / properties / body / title
      Added value: +"UpdateCouponParams"
  2. First observedv2.0.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare that this is a non-read-only, idempotent, non-destructive, open-world mutation. The description adds useful context beyond annotations: it requires a Sub-Account (location) token and the payments/coupons.write OAuth scope, and specifies the endpoint and API version. It does not explain return behavior or partial-update semantics, but the auth and safety context is substantive.

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 purpose is front-loaded, followed by relevant endpoint, version, token, and OAuth details. There is minor boilerplate in the opening sentence, but the overall structure is efficient and easy to scan.

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 mutation tool with a single nested body parameter and a fully documented schema, the description covers purpose, endpoint, version, auth token, and OAuth scope. It does not describe return values, but no output schema exists and the tool is otherwise sufficiently explained.

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 documents every field including id, code, discountType, discountValue, dates, and usage limits. The description mentions discount values, validity periods, and usage limits, but adds no syntax or format guidance beyond what the schema provides.

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 states a specific verb and resource: updating an existing payment coupon. It clearly distinguishes the operation from creating or listing coupons by emphasizing modification of existing coupon details. However, it does not explicitly name sibling tools as alternatives, keeping it just short of a 5.

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?

The description says to use the endpoint 'to adjust or extend promotional offers for your customers,' which implies usage context. It does not state when not to use it, nor does it reference alternatives such as ghl_payment_coupon_create or ghl_payment_coupon_get.

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