Skip to main content
Glama

Create itinerary item

segment_create

Create a new segment in a trip. FIRST call segment_get_schema to get the required fields for the segment type. Then provide the trip_id, segment_type, and fields matching the schema. Segment dates must fall within the parent trip dates; use trip_update first to extend the trip.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldsNoField values matching the schema for the segment type. Get schema first with segment_get_schema.
trip_idYesThe trip ID to add the segment to
segment_typeNoThe type of segment to create (Flight, Lodging, CarRental, Train, Transfer, Ferry, EventTicket, Parking, Activity, Note, Poll)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare this is a non-read-only, non-destructive, non-idempotent write; the description adds real behavioral context beyond them by disclosing the date-within-parent-trip validation rule and the ordering dependency on segment_get_schema. It does not cover auth/permission requirements or what happens on validation failure, so it is not a 5.

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

Conciseness5/5

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

Three short sentences, front-loaded with the action and then the required call order and constraint; each sentence carries distinct information with no repetition of the schema.

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?

Covers the prerequisite, required identifiers, dynamic field source, and a key validation constraint for a create tool with no output schema. It leaves the return value (e.g., the created segment ID for chaining) unstated, which is a minor gap given no output schema exists.

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; the description goes beyond it by explaining that `fields` is dynamic and must be derived from segment_get_schema for the chosen segment_type, which the schema only hints at. This meaningfully disambiguates the nested, type-dependent parameter.

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 a new segment in a trip') and the description's workflow (schema lookup, then trip_id + segment_type + fields) makes clear it creates a single typed segment, distinguishing it from segment_update and batch_segment_create. 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 Guidelines4/5

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

Gives a concrete prerequisite sequence ('FIRST call segment_get_schema') and a pre-condition with a remediation path ('dates must fall within parent trip dates; use trip_update first to extend the trip'), which is unusually clear context. It stops short of saying when to prefer batch_segment_create over this tool or any explicit exclusion.

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