Skip to main content
Glama
baskcart

W3Ship MCP Server

by baskcart

list_bookings

Retrieve confirmed session bookings with optional filters for location or date to manage scheduling and availability.

Instructions

List all confirmed session bookings. Optionally filter by location or date.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
locationIdNoFilter by location ID
dateNoFilter by date (YYYY-MM-DD)

Implementation Reference

  • The handler for the 'list_bookings' tool which fetches booking information from the W3Ship API.
    case 'list_bookings': {
        const locationId = args?.locationId as string | undefined;
        const date = args?.date as string | undefined;
    
        const params = new URLSearchParams();
        if (locationId) params.set('locationId', locationId);
        if (date) params.set('date', date);
        const queryStr = params.toString() ? `?${params.toString()}` : '';
    
        const bookingsRes = await fetch(`${W3SHIP_API}/api/bookings${queryStr}`);
        const bookingsData = await bookingsRes.json();
    
        return { content: [{ type: 'text', text: JSON.stringify(bookingsData, null, 2) }] };
    }
  • src/index.ts:194-203 (registration)
    The tool registration block for 'list_bookings' in the server configuration.
        name: 'list_bookings',
        description: 'List all confirmed session bookings. Optionally filter by location or date.',
        inputSchema: {
            type: 'object',
            properties: {
                locationId: { type: 'string', description: 'Filter by location ID' },
                date: { type: 'string', description: 'Filter by date (YYYY-MM-DD)' },
            },
        },
    },

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/baskcart/w3ship-mcp-server'

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