Skip to main content
Glama

Set trip guest nights

set_trip_guest_nights
DestructiveIdempotent

Replace one hotel guest's allocated nights on a Trip: each night's room and tax share for that person, inside their stay, checkout exclusive. The list you pass is the whole set; an empty list clears the nights. stay_id and guest_id (guests[].id, not user_id) come from list_project_travel. Creates no expense or charge. Pass trip_id when the project has more than one Trip. Needs financial and project-manager access. Asks for confirmation first.

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": {
      "project_id": "<project_id>",
      "stay_id": "<stay_id>",
      "guest_id": "<guest_id>",
      "nights": "<nights>"
    },
    "name": "set_trip_guest_nights"
  }
}

Input Schema

NameRequiredDescriptionDefault
nightsYesthe full list of nights; an empty list clears them
stay_idYesstay id from list_project_travel
trip_idNoTrip id from list_project_travel kind=trips; needed when the project has more than one Trip
guest_idYesthe guest row's id (guests[].id), not user_id
project_idYesproject id from list_projects, or a gig's project_id from get_event
organization_idNoorganization to act in, an id from get_me; omit to use your active organization
confirmation_tokenNoleave empty on the first call; the server returns confirmation_required + a token, then resend the SAME args with that token to proceed

Output Schema

NameRequiredDescriptionDefault
okYestrue on success (including confirmation_required prompts)
dataNowhen the tool asks first: { status: "confirmation_required", confirmation_token, summary, expires_in_seconds, instructions } and nothing is changed; once confirmed, the API response { status (HTTP status), data: { project_id, trip_id, trip_name, trip_revision, project_name, currency, billing_event_id, gigs [{ event_id, title, event_date, end_date, is_billing }], travellers [{ user_id, user_name }], external_sources [{ id, source, external_id, external_status, traveller_label, cancelled_at }], buyouts [{ id, category, amount, currency, notes }], viewer, bookings { flights, stays, rides }, schedule { project_id, days, undated }, event_trips [{ trip_id, trip_name }] } }
errorNowhen ok is false

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only say this is a non-readonly, destructive, idempotent write. The description goes well beyond that by disclosing whole-set replacement semantics ("The list you pass is the whole set"), the clearing behavior, that no expense or charge is created as a side effect, the required permission level, and the two-step confirmation flow. These are exactly the behavioral facts an agent needs before calling a destructive tool.

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 mutation verb and its scope, then prerequisites, then confirmation handling. Every clause carries information — no filler, no restatement of the title.

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?

With an output schema present, the description need not explain returns, and it covers the remaining gaps: ID provenance, multi-Trip disambiguation, clearing semantics, authorization, and the confirmation token dance. Nothing an agent needs to call this destructive tool correctly is missing.

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%, so the baseline is 3, and most of the description's parameter guidance (stay_id from list_project_travel, guest_id is guests[].id not user_id, trip_id for multi-Trip projects) restates what the schema already documents. It does add "checkout exclusive" and the whole-list replacement framing for nights, which is modest value on top of a very well-documented schema.

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?

The description states a specific verb and resource ("Replace one hotel guest's allocated nights on a Trip") and immediately scopes it ("each night's room and tax share for that person, inside their stay, checkout exclusive"). This is clearly distinct from a buyout-setter or a guest-list mutator, so 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?

It gives concrete operating conditions: pass trip_id only when the project has multiple Trips, an empty list is the way to clear nights, and financial plus project-manager access is required. It does not name a sibling alternative (e.g. when to use set_trip_buyouts instead), which keeps it short of 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.