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'],
        },
    },
Behavior3/5

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

With no annotations provided, the description carries the full burden. It successfully discloses the authorization requirement (seller-only), but omits behavioral details like idempotency, side effects on associated orders/carts, return values, or reversibility of the deletion.

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?

Two sentences, zero waste. The first states the action; the second states the critical authorization constraint. Both earn their place and are front-loaded with no filler text.

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

Completeness4/5

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

For a simple two-parameter deletion tool with 100% schema coverage, the description covers the essential business logic (auth) and action. It lacks return value documentation (compounded by no output schema), but adequately covers the operational contract for an AI agent to invoke the tool correctly.

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

Parameters4/5

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

While the schema has 100% coverage documenting both listingId and sellerAddress, the description adds crucial business context: 'Only the seller can remove their own listing' reinforces the validation rule on sellerAddress ('must match listing'), adding semantic meaning beyond the schema's syntax description.

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 uses a specific verb ('Remove') with a clear resource ('marketplace listing'), immediately distinguishing it from sibling tools like get_listing (fetch) or create_listing (create). The scope is unambiguous.

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

Usage Guidelines4/5

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

The second sentence ('Only the seller can remove their own listing') provides explicit authorization constraints, effectively guiding when to use (you are the seller) and when not to use (you are not the seller). It lacks explicit naming of alternatives for non-sellers, but the permission boundary is clearly stated.

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

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