Skip to main content
Glama
baskcart

W3Ship MCP Server

by baskcart

add_tracking

Add shipping tracking information to an order by providing the carrier and tracking number, enabling buyers to monitor their shipment status.

Instructions

Seller tool: Add real shipping tracking info to an order after shipping the item. Provides the buyer with a tracking number and carrier.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
orderIdYesThe order ID
carrierYesShipping carrier: UPS, FedEx, USPS, DHL, etc.
trackingNumberYesCarrier tracking number
sellerAddressNoSeller wallet address (for verification). Uses W3SHIP_PUBLIC_KEY if not provided.

Implementation Reference

  • The handler logic for the 'add_tracking' tool, which forwards a tracking update request to the W3SHIP_API.
    case 'add_tracking': {
        const { orderId: trackOrderId, carrier: trackCarrier, trackingNumber: trackNum, sellerAddress: trackSeller } = args as any;
        try {
            const trackRes = await fetch(`${W3SHIP_API}/api/shipment`, {
                method: 'POST',
                headers: { 'Content-Type': 'application/json' },
                body: JSON.stringify({
                    orderId: trackOrderId,
                    carrier: trackCarrier,
                    trackingNumber: trackNum,
                    sellerAddress: trackSeller || CONFIGURED_KEY,
                }),
            });
            const trackData = await trackRes.json() as any;
    
            if (!trackRes.ok) {
                return {
                    content: [{ type: 'text', text: `Error adding tracking: ${trackData.error || 'Unknown error'}` }],
                    isError: true,
                };
            }
    
            return {
                content: [{
                    type: 'text',
                    text: JSON.stringify({
                        orderId: trackOrderId,
                        carrier: trackCarrier,
                        trackingNumber: trackNum,
                        shipmentId: trackData.shipment?.id || trackData.shipmentId,
                        message: `Tracking added! Buyer can now track their shipment via ${trackCarrier}: ${trackNum}`,
                    }, null, 2)
                }]
            };
        } catch (e: any) {
            return { content: [{ type: 'text', text: `Error adding tracking: ${e.message}` }], isError: true };
        }
    }
  • The schema definition for the 'add_tracking' tool in the tool listing handler.
        name: 'add_tracking',
        description: 'Seller tool: Add real shipping tracking info to an order after shipping the item. Provides the buyer with a tracking number and carrier.',
        inputSchema: {
            type: 'object',
            properties: {
                orderId: { type: 'string', description: 'The order ID' },
                carrier: { type: 'string', description: 'Shipping carrier: UPS, FedEx, USPS, DHL, etc.' },
                trackingNumber: { type: 'string', description: 'Carrier tracking number' },
                sellerAddress: { type: 'string', description: 'Seller wallet address (for verification). Uses W3SHIP_PUBLIC_KEY if not provided.' },
            },
            required: ['orderId', 'carrier', 'trackingNumber'],
        },
    },
Behavior3/5

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

With no annotations, the description carries full burden. It discloses the buyer-side effect ('Provides the buyer with...'), but omits mutation details like idempotency, overwrite behavior, or the verification purpose of sellerAddress mentioned in the schema.

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 efficient sentences with zero waste. 'Seller tool:' front-loading immediately establishes context. Every word earns its place; no redundancy with schema or name.

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

Completeness3/5

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

Adequate for a 4-parameter mutation tool with no output schema—it explains the action and primary side effect. However, gaps remain around error cases (e.g., invalid tracking numbers), return value structure, and whether the operation is idempotent.

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?

Schema has 100% coverage with clear descriptions. The description references 'tracking number and carrier' and implies the order target, reinforcing the schema, but adds no syntax, format details, or parameter relationships beyond what's in the schema properties.

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?

Clear verb ('Add'), resource ('shipping tracking info'), and scope ('to an order'). The 'Seller tool' prefix effectively restricts the audience. However, it doesn't explicitly differentiate from sibling 'track_shipment' (which likely queries tracking vs. adding it).

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

Usage Guidelines3/5

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

Provides implicit guidance via 'after shipping the item' (sequencing) and 'Seller tool' (role restriction). However, it lacks explicit 'when not to use' or named alternatives (e.g., whether to use this vs. updating an order).

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