Skip to main content
Glama

Get itinerary item fields

segment_get_schema
Read-onlyIdempotent

Get the schema for a segment type. CALL THIS FIRST before creating/updating segments. Returns required fields and their types for the specified segment type. Supported types: Flight, Lodging, CarRental, Train, Transfer, Ferry, EventTicket, Parking, Activity, Note, Poll. For commercial cruise reservations and sea/port days use cruise_* tools. Never substitute Activity, CruiseActivity or another segment type for a cruise day. Ordinary shore excursions remain valid Activity/CruiseActivity. If cruise tools are unavailable explain the limitation and ask for clarification. Cruise/CruiseDay generic writes require the dedicated cruise tools; their schemas and full reads remain available. Additional supported schemas: Cruise, CruiseDay, CruiseActivity.

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": {
      "segment_type": "<segment_type>"
    },
    "name": "segment_get_schema"
  }
}

Input Schema

NameRequiredDescriptionDefault
segment_typeYesThe segment type to get schema for (Flight, Lodging, CarRental, Train, Transfer, Ferry, EventTicket, Parking, Activity, Note, Poll); also Cruise, CruiseDay and CruiseActivity

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so safety is covered; the description adds that the return payload contains required fields and their types, which matters since there is no output schema. It also discloses a fallback behavior when cruise tools are unavailable (explain the limitation and ask for clarification), a useful behavioral detail not present in annotations.

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 first two sentences are tight and front-loaded, but roughly two-thirds of the description is a cruise caveat block that restates the same exclusion (dedicated cruise tools vs. Activity/CruiseActivity) across four sentences. The signal is valid but the size is disproportionate to a one-parameter schema lookup.

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 simple read-only schema lookup with a fully documented single parameter, this covers purpose, ordering, return contents, and the one edge case (cruise segments) an agent is likely to get wrong. Nothing essential is missing, though the cruise caveat could be condensed without losing information.

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 the single segment_type property already enumerates the accepted values, so the description's type list is largely redundant. The only added nuance is the trailing mention that Cruise, CruiseDay, and CruiseActivity are also valid schemas, which the schema description already states.

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 ("Get the schema for a segment type") and immediately clarifies the output ("Returns required fields and their types"). The instruction to call it before creating/updating segments clearly separates it from segment_create/segment_update/batch_segment_create siblings.

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?

Explicit sequencing guidance ("CALL THIS FIRST before creating/updating segments") and explicit routing away from cruise scenarios to cruise_* tools, including a when-not rule ("Never substitute Activity, CruiseActivity ... for a cruise day"). The remaining cruise paragraphs repeat the same exclusion several ways rather than adding new conditions, which keeps it below a 5.

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