Skip to main content
Glama

Отмена заказа

ticket_cancel

Cancel a movie or concert ticket order, returning tickets but keeping the service fee. Requires user confirmation before cancellation; only if the bank allows cancellation.

Instructions

Отменить заказ билета. kind — "movie" или "concert".

Отменяется заказ, у которого банк сам выставил isCancelAvailable=true — это видно в order_details(). Такой заказ уходит в PARTIALLY_CANCELED, а не CANCELED: билеты возвращают, сервисный сбор — нет, и «частично» здесь не ошибка. Билеты вернут, сервисный сбор не возвращается — покажи это пользователю и дождись согласия, прежде чем отменять.

Заказ, помеченный isCancelAvailable=false, хост отменять отказывается: отвечает status=Failed с кодом и НИЧЕГО не меняет. Повторять такой вызов бессмысленно.

Тул сначала читает заказ и, если банк отменять не даёт, НЕ ходит в хост вовсе — такой запрос всё равно ничего бы не изменил. force=True отправляет его всё равно.

payment_id подставляется из заказа, если его не передать; он же лежит в ответе ticket_pay(). У неоплаченной брони его нет — её и не нужно отменять, она истекает сама.

Если тул вернёт ошибку, считай статус НЕИЗВЕСТНЫМ (не «всё ещё забронировано») — проверь orders() и при необходимости отменяй через приложение.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindNomovie
forceNo
order_idYes
payment_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

This is a strong disclosure beyond what annotations provide. The description reveals that the tool first checks the booking and does not even contact the host when cancellation is not available, explains force=True semantics, states that a refused cancellation leaves no state behind, and clarifies that an error does not mean 'still booked'. These are exactly the invisible behaviors an agent needs.

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?

The description is structured for agent consumption: a one-sentence summary up front, followed by the cancellation model, then parameter semantics, then failure handling. Every sentence adds a distinct actionable fact, and the repeated statement about ticket return and service fee is justified because that repeated notice is also user-facing consent guidance.

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?

The description is complete for a complex, conditional cancellation flow. It covers cancellable and non-cancellable orders, partial cancellation, force behavior, payment_id derivation, unpaid bookings, host refusal behavior, and unknown status handling in an error case. It also points to order_details(), ticket_pay(), and orders() as exact orientation points for an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, yet the description compensates fully for all parameters: kind is limited to movie or concert, force changes host call behavior, and payment_id is sourced from the order or ticket_pay() and is absent for unpaid bookings. The core parameter order_id is naturally understood as the ticket order identifier.

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 opens with a specific verb and resource: 'Отменить заказ билета'. It immediately distinguishes the domain by stating kind is 'movie' or 'concert', making it clear this is not the generic train, flight, or grocery cancellation tool. It also names the observable outcome — PARTIALLY_CANCELED — which disambiguates what 'cancel' actually does here.

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?

The description gives explicit when-to-use and when-not-to-use rules: call only when isCancelAvailable=true, do not call when it is false, and do not cancel unpaid bookings because they expire on their own. It also tells the agent to wait for user consent and provides a fallback: if an error occurs, treat the status as unknown, re-check via orders(), and cancel through the app if needed.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/icyberdeveloper/tbank-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server