Skip to main content
Glama

KeyFlight PNR Converter

Decode a PNR

decode_pnr
Read-only

Decode a raw PNR into a readable itinerary (text) and structured JSON: passengers, flights, airports, terminals, times, flight duration, airline locators. Each decode with flights counts towards the monthly limit of the KeyFlight subscription, as in the PNR API.

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": {
      "text": "<text>"
    },
    "name": "decode_pnr"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesThe PNR as shown by the GDS (Amadeus, Sabre, Galileo/Apollo, Worldspan), up to 20000 characters.
viewNoLayout of the itinerary text. Default: table.
date_formatNo"short" (18 Jun 2026) or "numeric" (18.06.2026).
time_formatNo24 or 12 hour time. Default: 24.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered. The description adds genuinely useful context beyond that: each decode with flights consumes the monthly KeyFlight subscription limit, which affects invocation decisions. It does not say what happens with an unparseable PNR or whether failures consume quota.

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?

Two sentences, front-loaded with the action and outputs, with the quota caveat following. Both sentences carry information; the enumerations are slightly dense but each item is meaningful.

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?

There is no output schema, so the description must (and does) characterize return values as both text and structured JSON with named fields. Missing only failure behavior and whether quotas are consumed on error, which are secondary for a read-only decode.

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 every parameter (text, view, date_format, time_format) has an inline description with enums, so the schema does the work. The description adds nothing parameter-specific beyond calling the input a 'raw PNR'; baseline 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 ('Decode a raw PNR') and enumerates the concrete outputs (readable itinerary text plus structured JSON with passengers, flights, airports, terminals, times, durations, locators). This is clearly distinguishable from the sibling make_ticket, which is an action, not a parse.

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: the agent can infer it should call this when holding a raw GDS PNR string, but there is no explicit when-to-use, when-not-to-use, or named alternative. The quota sentence gives cost context but not selection guidance.

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.