Skip to main content
Glama

Create itinerary items

batch_segment_create

Create multiple segments in a trip in one call. All-or-nothing: if any segment fails validation, none are created. Max 20 segments per call. Use segment_get_schema to learn field names for each type. Segment dates must fall within the parent trip dates; use trip_update first to extend the trip.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
trip_idYesThe trip ID to add segments to
segmentsYesArray of segments to create. Each must have segment_type and fields.

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?

Annotations only declare the generic profile (not read-only, not destructive, not idempotent), while the description adds the transaction semantics that actually matter here: atomic all-or-nothing failure behavior and a hard 20-item cap. It also discloses the cross-entity validation rule that dates must sit inside the parent trip's range, which is not derivable from the schema.

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?

Front-loaded with the action, followed by the constraints that most affect correctness (atomicity, cap, date bounds, schema lookup). Every sentence carries distinct information; nothing is restated from the schema or annotations.

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 multi-item write tool with no output schema and no annotations beyond generic hints, the description covers atomicity, limits, validation bounds, and prerequisite lookups/updates. The only gap is what comes back after success (e.g., created segment IDs), which an agent would have to discover empirically.

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 trip_id and segments are already documented in the schema; the baseline there is 3. The description adds real value by explaining that the shape of `fields` is type-dependent and must be looked up via segment_get_schema, which is a semantic dependency the schema only gestures at.

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+resource+mode: 'Create multiple segments in a trip in one call,' which immediately distinguishes it from the single-segment sibling segment_create. The batch nature is stated in the title and first sentence, so an agent can pick between them without opening schemas.

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?

Gives explicit operating conditions: max 20 segments per call, all-or-nothing validation, dates must fall within the parent trip dates, and it routes to segment_get_schema for field names and to trip_update when the trip must be extended first. This is exactly the when/when-not/alternative guidance expected.

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