Skip to main content
Glama
baskcart

W3Ship MCP Server

by baskcart

remove_listing

Delete a marketplace listing by its ID. Requires seller authorization to remove their own listings from the W3Ship marketplace.

Instructions

Remove a marketplace listing. Only the seller can remove their own listing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
listingIdYesThe listing ID to remove
sellerAddressNoSeller wallet address (must match listing). Uses W3SHIP_PUBLIC_KEY if not provided.

Implementation Reference

  • Handler implementation for the 'remove_listing' tool which communicates with the W3Ship API to delete a marketplace listing.
    case 'remove_listing': {
        const { listingId: removeId, sellerAddress: removeSeller } = args as any;
        const rmSeller = removeSeller || CONFIGURED_KEY;
        try {
            const params = new URLSearchParams({ id: removeId });
            if (rmSeller) params.set('seller', rmSeller);
            const delRes = await fetch(`${W3SHIP_API}/api/listing?${params.toString()}`, { method: 'DELETE' });
            const delData = await delRes.json() as any;
            if (!delRes.ok) {
                return { content: [{ type: 'text', text: `Error: ${delData.error || 'Failed to remove listing'}` }], isError: true };
            }
            return {
                content: [{
                    type: 'text',
                    text: JSON.stringify({ removed: removeId, message: delData.message || 'Listing removed.' }, null, 2)
                }]
            };
        } catch (e: any) {
            return { content: [{ type: 'text', text: `Error removing listing: ${e.message}` }], isError: true };
        }
    }
  • MCP tool registration and input schema definition for 'remove_listing'.
        name: 'remove_listing',
        description: 'Remove a marketplace listing. Only the seller can remove their own listing.',
        inputSchema: {
            type: 'object',
            properties: {
                listingId: { type: 'string', description: 'The listing ID to remove' },
                sellerAddress: { type: 'string', description: 'Seller wallet address (must match listing). Uses W3SHIP_PUBLIC_KEY if not provided.' },
            },
            required: ['listingId'],
        },
    },

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