Skip to main content
Glama
baskcart

W3Ship MCP Server

by baskcart

delete_cart

Remove a shopping cart from the W3Ship MCP Server by providing its public key ID, clearing stored cart data.

Instructions

Delete a shopping cart.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesPublic key ID of the cart

Implementation Reference

  • The deleteCart function in ValkeyService performs the actual deletion from Redis.
    async deleteCart(cartId: string): Promise<void> {
        await this.getClient().del(`cart:${cartId}`);
    }
  • The CallToolRequestSchema handler for 'delete_cart' in src/index.ts invokes ValkeyService.deleteCart.
    case 'delete_cart': {
        const id = (args?.id as string) || CONFIGURED_KEY;
        if (!id) {
            return { content: [{ type: 'text', text: 'Error: No cart ID. Set W3SHIP_PUBLIC_KEY or provide an id.' }], isError: true };
        }
        await valkeyService.deleteCart(id);
        return { content: [{ type: 'text', text: `Cart ${id} deleted successfully.` }] };
    }
  • src/index.ts:124-133 (registration)
    The delete_cart tool is registered in the list of tools returned by the MCP server.
        name: 'delete_cart',
        description: 'Delete a shopping cart.',
        inputSchema: {
            type: 'object',
            properties: {
                id: { type: 'string', description: 'Public key ID of the cart' },
            },
            required: ['id'],
        },
    },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. While 'Delete' implies destruction, it fails to clarify if the operation is permanent, what happens to items contained in the cart, or whether it triggers cancellation of associated orders. No mention of required permissions or reversibility.

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?

Extremely concise at four words with no redundancy. However, for a destructive operation, this brevity borders on under-specification; nonetheless, the sentence earns its place and is appropriately front-loaded.

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?

Inadequate for a destructive operation with no annotations and no output schema. The description omits critical safety context such as permanence, side effects on cart items, or relationship to the order creation workflow (given sibling tools like create_order and confirm_payment).

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?

The input schema has 100% description coverage for the 'id' parameter ('Public key ID of the cart'). The description adds no additional parameter context, but with complete schema coverage, the baseline score of 3 is appropriate.

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 ('Delete') and resource ('shopping cart'), making the basic purpose immediately clear. It implicitly distinguishes from siblings like get_cart (read) and create_cart (write), though it does not explicitly differentiate from remove_listing or clarify the cart vs. order lifecycle.

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 this versus alternatives (e.g., whether to use this for abandoned carts versus cancelling active orders), nor are prerequisites stated (e.g., whether the cart must be empty or if it affects pending checkouts).

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