Skip to main content
Glama

Create Booking Payment Link

create_booking_payment_link
Idempotent

For a reservation that reserve_slot returned with payment.required = true: returns the MPP payment link, the amount charged now, and the balance due at the visit. The agent pays it itself (HTTP 402 challenge, then the person's wallet credential); no code is sent to the customer for a paid booking. A booking that takes no payment through Advocate answers payment_required false with a detail, not an error, and, if not confirmed yet, is confirmed with confirm_booking and the customer's code.

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": {
      "slug": "<slug>",
      "reservation_id": "<reservation_id>"
    },
    "name": "create_booking_payment_link"
  }
}

Input Schema

NameRequiredDescriptionDefault
slugYesBusiness slug identifier
reservation_idYesThe reservation_id reserve_slot returned with payment.required = true

Output Schema

NameRequiredDescriptionDefault
kindNo
detailNoPresent when payment_required is false: what to do instead, since no payment is taken through Advocate
currencyNo
expires_atNoUnix seconds after which the reservation lapses unpaid
amount_centsNoMinor units charged now
due_at_visitNo
instructionsNo
payment_linkNoPOST here (no body) to receive the HTTP 402 MPP challenge
reservation_idNoPresent when payment_required is false
payment_requiredYestrue: payment for this booking is taken through Advocate; it may already be authorized or in flight, so ask for a new approval only if the pay route answers 402. Comes with payment_link, amount_cents, currency, kind, balance_due_cents, due_at_visit, expires_at and instructions. false: no payment is taken through Advocate for this booking, which does not mean the service is free. Comes with reservation_id and detail only.
balance_due_centsNoMinor units due at the visit

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedOutput schema / properties / detail
      Added value: +{
      +  "description": "Present when payment_required is false: what to do instead, since no payment is taken through Advocate",
      +  "type": "string"
      +}
    • addedOutput schema / properties / payment_required
      Added value: +{
      +  "description": "true: payment for this booking is taken through Advocate; it may already be authorized or in flight, so ask for a new approval only if the pay route answers 402. Comes with payment_link, amount_cents, currency, kind, balance_due_cents, due_at_visit, expires_at and instructions. false: no payment is taken through Advocate for this booking, which does not mean the service is free. Comes with reservation_id and detail only.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / reservation_id
      Added value: +{
      +  "description": "Present when payment_required is false",
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "payment_link",
      -  "amount_cents",
      -  "currency",
      -  "kind",
      -  "balance_due_cents",
      -  "due_at_visit",
      -  "expires_at",
      -  "instructions"
      -]New value: +[
      +  "payment_required"
      +]
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only supply readOnlyHint=false, idempotentHint=true and destructiveHint=false; the description adds the material behavior: the agent pays the link itself via an HTTP 402 challenge and the person's wallet credential, and no code is sent to the customer for a paid booking. It also discloses the non-error soft-failure shape and the retry/confirmation route, none of which is recoverable from annotations.

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 precondition is front-loaded and the sentences each carry distinct information (return contents, payment mechanism, non-payment fallback). It is dense but every clause earns its place, though the wallet/402 detail could be trimmed slightly for readability.

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?

With an output schema present the description need not enumerate return fields, yet it still flags what comes back and covers the edge case (payment_required false, unconfirmed booking) plus the follow-up call. Nothing an agent needs to invoke this correctly is missing.

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 coverage is 100% and reservation_id's own schema description already ties it to reserve_slot's payment.required = true, so the description mostly restates that binding. Baseline 3 is appropriate since the schema carries parameter meaning.

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 and resource ('returns the MPP payment link, the amount charged now, and the balance due') and scopes it to reservations that reserve_slot returned with payment.required = true, which cleanly separates it from confirm_booking and the other booking 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?

Gives an explicit precondition for use, names the alternative path (confirm_booking with the customer's code) when the booking takes no payment, and states that the non-payment case comes back as payment_required false rather than an error, so the agent knows both when to call and what to do otherwise.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources