Skip to main content
Glama
baskcart

W3Ship MCP Server

by baskcart

get_listing

Retrieve complete marketplace listing details using a specific ID to access product information and specifications.

Instructions

Get full details of a specific marketplace listing by ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
listingIdYesThe listing ID

Implementation Reference

  • The `get_listing` tool handler in `src/index.ts` fetches marketplace listing details from the `W3SHIP_API`.
    case 'get_listing': {
        const { listingId } = args as any;
        try {
            const getRes = await fetch(`${W3SHIP_API}/api/listing?id=${encodeURIComponent(listingId)}`);
            const getData = await getRes.json() as any;
            if (!getRes.ok || !getData.listing) {
                return { content: [{ type: 'text', text: `Listing "${listingId}" not found.` }], isError: true };
            }
            const listing = getData.listing;
            return {
                content: [{
                    type: 'text',
                    text: JSON.stringify({
                        listing: {
                            id: listing.id, title: listing.title, description: listing.description,
                            price: `${listing.price} ${listing.currency}`, category: listing.category,
                            condition: listing.condition, seller: listing.sellerName || listing.sellerAddress,
                            paymentAddress: listing.sellerAddress, quantity: listing.quantity,
                            shipsTo: listing.shipsTo, status: listing.status,
                            createdAt: listing.createdAt, expiresAt: listing.expiresAt,
                        },
                        actions: {
                            addToCart: `Use add_item with productOffering.id = "${listing.id}" and productOffering.name = "${listing.title}"`,
                            payWith: `Send ${listing.price} ${listing.currency} to ${listing.sellerAddress}`,
                        },
                    }, null, 2)
                }]
            };
        } catch (e: any) {
            return { content: [{ type: 'text', text: `Error getting listing: ${e.message}` }], isError: true };
        }
    }
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 'Get' implies a read-only operation, the description lacks critical details: error behavior when the ID doesn't exist, authentication requirements, rate limits, or what constitutes 'full details' given the absence of an output 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?

The description is a single, efficient sentence of nine words. It is front-loaded with the action verb and contains no redundant or filler text. Every word serves a purpose in defining the tool's function.

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?

For a single-parameter retrieval tool, the description meets minimum viability. However, given the lack of an output schema or annotations, the description should ideally characterize the returned data structure or content types. As written, it leaves significant ambiguity about the response format.

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 coverage is 100% ('The listing ID'), establishing a strong baseline. The description reinforces the parameter's role with 'by ID' but does not add semantic constraints (e.g., format, length, source from create_listing) or usage examples beyond what the schema already provides.

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 ('Get') and resource ('marketplace listing') and clarifies scope ('full details', 'by ID'). It implicitly distinguishes from sibling 'search_listings' by emphasizing 'specific' retrieval by ID rather than querying, though explicit differentiation would strengthen this.

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?

The description provides no guidance on when to use this tool versus alternatives like 'search_listings' (for finding listings without an ID) or 'get_cart'/'get_order' (for different business objects). No prerequisites or conditions are mentioned.

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