Skip to main content
Glama

Đặt chuyến

create_booking
Idempotent

Creates a trip from an existing quote ID after the user explicitly confirms the price and trip details. Repeat calls with the same quote ID do not create a second booking.

Instructions

Tạo chuyến từ một quote_id (sandbox). Chuyến sandbox: dùng simulate_booking để chuyển trạng thái. Chỉ gọi khi người dùng đã xác nhận rõ ràng giá và thông tin chuyến trong cuộc trò chuyện; đặt user_confirmed = true để xác nhận điều đó. Gọi lại với cùng quote_id không tạo chuyến thứ hai.

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": {
      "quote_id": "<quote_id>",
      "user_confirmed": "<user_confirmed>",
      "customer": "<customer>"
    },
    "name": "create_booking"
  }
}

Input Schema

NameRequiredDescriptionDefault
noteNoGhi chú cho tài xế
vehicleNoXe của khách, chỉ cho dịch vụ lái hộ
customerYes
quote_idYes
flight_codeNo
payment_methodNoMặc định cash: khách trả tài xế
user_confirmedYestrue nghĩa là người dùng đã đồng ý giá và thông tin chuyến. Không tự đặt true khi người dùng chưa xác nhận.
partner_reference_idNoMã đơn phía đối tác, duy nhất. Bỏ trống thì MCP tự sinh dạng mcp-<uuid>.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, destructiveHint=false, so the description does not need to restate safety. It adds real value beyond them: a human-confirmation gate before the write, the sandbox state-machine pointer to simulate_booking, and the concrete idempotency mechanism (same quote_id never creates a second trip). It does not mention auth requirements, rate limits, or what a successful call returns.

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?

Four tight sentences, front-loaded with what the tool does before constraints and idempotency. Minor redundancy in stating the user-confirmation requirement twice in the same sentence pair, but nothing extraneous overall.

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 critical gaps for an 8-parameter, nested-object mutation: precondition to call, sandbox behavior, and idempotency. No output schema exists, yet the description never hints at what the created booking returns (identifier, status), which is the main remaining gap.

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 63%, so the schema already documents note, customer.phone, vehicle, payment_method, partner_reference_id and user_confirmed. The description adds meaning mainly for quote_id (source of the trip) and reinforces user_confirmed, but says nothing about the remaining fields, so it sits at the baseline.

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 trip from a quote_id) plus the sandbox scope, and explicitly routes state changes to the sibling simulate_booking. An agent can distinguish it from get_booking/cancel_booking without opening another schema.

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 an explicit precondition (only call after the user has clearly confirmed price and trip details) and names the alternative tool for state transitions (simulate_booking). The idempotency note also tells the agent re-calling is safe rather than an error case.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.