Skip to main content
Glama

Lock a flight offer

brij_create_flight_intent

Free over MCP (the x402 price quoted below applies to the HTTP API only; MCP calls are rate-limited instead). Creates the escrow for one offer. KEEP customer_support_code from the answer: it cannot be read again, and orders and refunds need it. Next: brij_book_flight. If the user gave you a discount code, send it as promo_code (checked before any payment; fee waived when it applies).

Create an escrow-backed booking intent from a selected offer.

Paid x402 endpoint. Send a valid PAYMENT-SIGNATURE header to create the intent. Without payment, the API returns 402 Payment Required.

Optional request field referrer: an affiliate code (see POST /affiliates) — the resolved affiliate wallet is frozen on the intent and credited a share of the platform fee once the booking captures and the journey is flown without refund; unknown or self-referring codes are silently ignored.

Creates the local booking intent and initializes its Solana escrow. This does not fund the escrow, pay the airline, or issue a ticket.

Send an offer_id back EXACTLY as received.

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": {
      "funding_wallet": "<funding_wallet>",
      "offer_id": "<offer_id>"
    },
    "name": "brij_create_flight_intent"
  }
}

Input Schema

NameRequiredDescriptionDefault
offer_idYesThe offer to book, sent back EXACTLY as received from POST /air/search or POST /air/offer-details — never reassembled by hand.
referrerNoOptional affiliate code (see POST /affiliates). Not a discount: it credits the referrer a share of the platform fee. Unknown or self-referring codes are silently ignored.
promo_codeNoOptional discount code the user gave you (e.g. from a community or campaign). Send it exactly as the user wrote it; case does not matter. Waives the BRIJ service fee on flights and hotels. Checked BEFORE any payment: an unusable code refuses the intent, free, with promo_invalid (404), promo_expired (410), promo_exhausted (409, no seats left) or already_member (409, this wallet already redeemed a code) — tell the user and retry without it. When it applies, the answer carries intent.promo_code and a fee_amount of 0. The code is redeemed for the funding wallet once that wallet funds the escrow; after that every booking from the wallet is fee-free until the benefit ends, with no code to resend.
refund_walletNoOptional Solana wallet for refunds. Defaults to funding_wallet.
funding_walletYesSolana wallet expected to fund the escrow.

Output Schema

NameRequiredDescriptionDefault
intentNoRead-only projection of a booking intent. Omits customer_support_code, promo_code and passenger PII; those fields are returned once at intent-creation and /book time.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / promo_code / description
      Previous value: -"Optional discount code the user gave you (e.g. from a community or campaign). Send it exactly as the user wrote it; case does not matter. Waives the BRIJ service fee on flights, trains, buses and hotels (not products). Checked BEFORE any payment: an unusable code refuses the intent, free, with promo_invalid (404), promo_expired (410), promo_exhausted (409, no seats left) or already_member (409, this wallet already redeemed a code) — tell the user and retry without it. When it applies, the answer carries intent.promo_code and a fee_amount of 0. The code is redeemed for the funding wallet once that wallet funds the escrow; after that every booking from the wallet is fee-free until the benefit ends, with no code to resend."New value: +"Optional discount code the user gave you (e.g. from a community or campaign). Send it exactly as the user wrote it; case does not matter. Waives the BRIJ service fee on flights and hotels. Checked BEFORE any payment: an unusable code refuses the intent, free, with promo_invalid (404), promo_expired (410), promo_exhausted (409, no seats left) or already_member (409, this wallet already redeemed a code) — tell the user and retry without it. When it applies, the answer carries intent.promo_code and a fee_amount of 0. The code is redeemed for the funding wallet once that wallet funds the escrow; after that every booking from the wallet is fee-free until the benefit ends, with no code to resend."
  2. Changed3 schema fields changed
    • addedInput schema / properties / promo_code
      Added value: +{
      +  "description": "Optional discount code the user gave you (e.g. from a community or campaign). Send it exactly as the user wrote it; case does not matter. Waives the BRIJ service fee on flights, trains, buses and hotels (not products). Checked BEFORE any payment: an unusable code refuses the intent, free, with promo_invalid (404), promo_expired (410), promo_exhausted (409, no seats left) or already_member (409, this wallet already redeemed a code) — tell the user and retry without it. When it applies, the answer carries intent.promo_code and a fee_amount of 0. The code is redeemed for the funding wallet once that wallet funds the escrow; after that every booking from the wallet is fee-free until the benefit ends, with no code to resend.",
      +  "type": "string"
      +}
    • addedInput schema / properties / referrer
      Added value: +{
      +  "description": "Optional affiliate code (see POST /affiliates). Not a discount: it credits the referrer a share of the platform fee. Unknown or self-referring codes are silently ignored.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / intent / description
      Previous value: -"Read-only projection of a booking intent. Omits customer_support_code and passenger PII; those fields are returned once at intent-creation and /book time."New value: +"Read-only projection of a booking intent. Omits customer_support_code, promo_code and passenger PII; those fields are returned once at intent-creation and /book time."
  3. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the annotations: it warns that customer_support_code cannot be read again and is needed for orders/refunds, that the escrow is created but not funded, that promo codes are checked before any payment and refuse the intent free with specific error codes, and that affiliate credit is frozen at intent time and only paid out after capture plus a flown, unrefunded journey. The MCP-vs-HTTP payment distinction (MCP free but rate-limited; x402 PAYMENT-SIGNATURE only for the HTTP API) is a behavioural detail no annotation carries. Nothing here contradicts readOnlyHint=false / destructiveHint=false.

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

Conciseness3/5

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

The core intent is stated three separate times in near-identical wording ("Creates the escrow for one offer", "Create an escrow-backed booking intent from a selected offer", "Creates the local booking intent and initializes its Solana escrow"), and the opening paragraph crams free-tier pricing, escrow creation, the support code, the next step and promo codes together. Valuable content is present but badly front-loaded and repetitive, and a dangling "price quoted below" reference points at nothing.

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 need not be explained, and the description still flags the one response field with consequences (customer_support_code). Combined with the escrow lifecycle, payment requirements, promo/affiliate side effects and next-step routing, an agent has everything needed to invoke this correctly on a 5-parameter mutation tool.

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% and the schema already documents offer_id, promo_code, referrer, refund_wallet and funding_wallet in detail. The description mostly restates that content ("Send an offer_id back EXACTLY as received", "send it as promo_code"), adding emphasis and urgency but little new semantic meaning per parameter, so the baseline of 3 applies.

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: "Create an escrow-backed booking intent from a selected offer" and "Creates the local booking intent and initializes its Solana escrow." It also draws the boundary against the neighbouring steps by naming "Next: brij_book_flight" and by explicitly denying scope ("This does not fund the escrow, pay the airline, or issue a ticket"), so an agent can tell it apart from booking/refund siblings without opening another schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear sequencing context ("Next: brij_book_flight", offer_id must come from a search/offer-details call) and conditional guidance for promo_code ("If the user gave you a discount code, send it as promo_code ... tell the user and retry without it"). Exclusions are present but framed as scope denials rather than an explicit "use X instead of this tool" routing rule against alternatives such as brij_create_hotel_intent.

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