Skip to main content
Glama

rezdy_agent_cancel_booking

Cancel travel bookings by ID through Rezdy Agent API. Process customer cancellations with optional reason specification for travel agents managing reservations.

Instructions

Cancel an existing booking

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bookingIdYesBooking ID
reasonNoCancellation reason

Implementation Reference

  • Handler function that executes the rezdy_agent_cancel_booking tool logic. Validates client is configured, extracts bookingId and reason from args, calls the client's cancelBooking method, and returns the response as JSON.
    private async handleCancelBooking(args: any) {
      const client = this.ensureClient();
      const { bookingId, reason } = args;
      const response = await client.cancelBooking(bookingId, reason);
      
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(response, null, 2),
          },
        ],
      };
    }
  • Underlying cancelBooking method in RezdyAgentClient that makes the actual API call to cancel a booking. Sends POST request to /marketplace/bookings/{bookingId}/cancel endpoint with optional cancellation reason in request body.
    async cancelBooking(bookingId: string, reason?: string): Promise<RezdyApiResponse> {
      const requestOptions: RequestInit = {
        method: 'POST',
      };
      
      if (reason) {
        requestOptions.body = JSON.stringify({ reason });
      }
      
      return this.makeRequest(`/marketplace/bookings/${bookingId}/cancel`, requestOptions);
    }
  • src/index.ts:341-352 (registration)
    Tool registration block defining the rezdy_agent_cancel_booking tool schema. Includes tool name, description, and input schema with bookingId (required) and reason (optional) properties.
    {
      name: 'rezdy_agent_cancel_booking',
      description: 'Cancel an existing booking',
      inputSchema: {
        type: 'object',
        properties: {
          bookingId: { type: 'string', description: 'Booking ID' },
          reason: { type: 'string', description: 'Cancellation reason' },
        },
        required: ['bookingId'],
      },
    },
  • src/index.ts:458-459 (registration)
    Case statement in the tool dispatcher switch block that routes rezdy_agent_cancel_booking calls to the handleCancelBooking method.
    case 'rezdy_agent_cancel_booking':
      return await this.handleCancelBooking(args);
Behavior2/5

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

No annotations are provided, so the description carries the full burden. While 'Cancel' implies a destructive/mutating operation, the description fails to disclose whether cancellation is permanent, if it triggers automatic refunds, notifies customers, or requires specific permissions. For a destructive tool, this is a significant gap.

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?

The description is three words with zero redundancy. It is front-loaded and efficient. However, it may be overly terse given the tool's destructive nature and lack of supporting annotations, preventing a perfect score.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive operation with no output schema and no annotations, the description is inadequate. It omits critical context about the consequences of cancellation, success/failure indicators, and side effects that an agent needs to safely invoke this tool.

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% (bookingId and reason are both documented). The description adds no additional parameter context (e.g., format expectations for bookingId, whether reason is mandatory for audit trails), which warrants the baseline score of 3 when the schema is comprehensive.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Cancel') and resource ('booking') that clearly distinguishes this from siblings like create_booking, update_booking, and get_booking. However, it doesn't specify the domain (Rezdy) or scope details that would make it a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

No guidance provided on when to use cancellation versus modification (update_booking), prerequisites (e.g., checking booking status first), or business rules (e.g., cancellation windows). The agent receives no signal about appropriate usage contexts.

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/jezweb/rezdy-agent-mcp'

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