Skip to main content
Glama

Request a flight refund

brij_request_flight_refund

Free over MCP (the x402 price quoted below applies to the HTTP API only; MCP calls are rate-limited instead).

Request a manual refund after the intent has been booked.

The intent id travels in the request body; the resource URL is static. Paid x402 endpoint. Send a valid PAYMENT-SIGNATURE header to record the refund request. Without payment, the API returns 402 Payment Required.

Records a refund request for a booked intent. The on-chain escrow has already been captured by the time the intent is booked, so refunds at this stage are processed manually by an operator. This endpoint persists the request and pages the operator on Telegram; the response is 202 Accepted and is not a guarantee of refund — eligibility and any applicable carrier penalties are reviewed manually.

For pre-capture states (active), the booking_sync worker handles refunds automatically; this endpoint returns 409 use_automatic_refund for those.

The caller must include the X-Customer-Support-Code header matching the code returned at intent creation.

For multi-passenger bookings, X-Passenger-Family-Name is the LEAD passenger's family name (position 0 of the /air/book list).

Input Schema

NameRequiredDescriptionDefault
reasonYesFree-text explanation of why the refund is requested.
contactNoOptional reply-to channel (email, phone, etc.) the operator can use to follow up.
intent_idYesId returned by POST /air/intents.
customer_support_codeYesThe customer_support_code returned when the intent was created.
passenger_family_nameYesFamily name of the passenger as captured at /book. Compared case-insensitively with leading/trailing whitespace trimmed.

Output Schema

NameRequiredDescriptionDefault
statusNo
intent_idNo
requested_atNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations, which only declare readOnly=false, destructive=false, idempotent=false and openWorld=true. The description discloses payment/auth mechanics (PAYMENT-SIGNATURE header, 402 without payment, rate limiting on MCP), the persisted-and-paged-operator side effect, the 202 Accepted response, an explicit warning that it is NOT a guarantee of refund, and the 409 behavior for active-state intents. That is exactly the operational context annotations cannot carry.

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 free-MCP/paid-HTTP distinction and then proceeds in short, purposeful paragraphs; the refund-eligibility caveat and 409 rule are given their own lines. Slightly weakened by the initial pricing paragraph creating mild internal tension with the later 'Paid x402 endpoint' sentence, costing a point but not 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?

An output schema exists, so return values needn't be spelled out, yet the description still explains the 202/402/409 responses and the manual-operator follow-up. Combined with prerequisites, auth headers and the multi-passenger rule, an agent has everything needed to call this correctly.

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: it identifies customer_support_code as travelling in the X-Customer-Support-Code header and tied to intent creation, and clarifies that passenger_family_name is the LEAD passenger's family name at position 0 of the /air/book list for multi-passenger bookings. That resolves an ambiguity the schema alone does not.

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 ('Request a manual refund after the intent has been booked') and immediately scopes it as manual post-capture processing, which separates it from the automatic refund path and from the train/product refund siblings. An agent can identify the operation without opening the 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?

Explicit preconditions ('after the intent has been booked') and an explicit when-not with the alternative ('For pre-capture states (active), the booking_sync worker handles refunds automatically; this endpoint returns 409 use_automatic_refund'). It also names the required X-Customer-Support-Code header precondition. Nothing about selection is left to inference.

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