Skip to main content
Glama
baskcart

W3Ship MCP Server

by baskcart

hold_slot

Reserve a bookable service time slot for 10 minutes while payment is processed. Use this tool to temporarily hold appointments by providing slot and cart IDs.

Instructions

Hold/reserve a session time slot for a customer. The slot is held for 10 minutes pending payment. Works for any bookable service.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slotIdYesThe time slot ID to hold
cartIdYesThe cart ID to associate with the hold
participantsNoNumber of participants (default: 1)

Implementation Reference

  • Handler for the 'hold_slot' tool, which sends a POST request to the W3Ship API to reserve a time slot.
    case 'hold_slot': {
        const slotId = args?.slotId as string;
        const cartId = args?.cartId as string;
        const participants = (args?.participants as number) || 1;
    
        if (!slotId || !cartId) {
            return { content: [{ type: 'text', text: 'Error: slotId and cartId are required.' }], isError: true };
        }
    
        const holdRes = await fetch(`${W3SHIP_API}/api/slots`, {
            method: 'POST',
            headers: { 'Content-Type': 'application/json' },
            body: JSON.stringify({ slotId, cartId, participants }),
        });
        const holdData = await holdRes.json();
    
        return { content: [{ type: 'text', text: JSON.stringify(holdData, null, 2) }] };
    }
  • Registration and input schema definition for the 'hold_slot' tool.
        name: 'hold_slot',
        description: 'Hold/reserve a session time slot for a customer. The slot is held for 10 minutes pending payment. Works for any bookable service.',
        inputSchema: {
            type: 'object',
            properties: {
                slotId: { type: 'string', description: 'The time slot ID to hold' },
                cartId: { type: 'string', description: 'The cart ID to associate with the hold' },
                participants: { type: 'number', description: 'Number of participants (default: 1)' },
            },
            required: ['slotId', 'cartId'],
        },
    },

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