Skip to main content
Glama

create_product

Add new products to ShipBob's fulfillment system by defining essential details like name, SKU, barcode, dimensions, weight, and value. Required fields: name and SKU.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
barcodeNoProduct barcode/UPC
descriptionNoProduct description
heightNoHeight in inches
lengthNoLength in inches
nameYesProduct name
skuYesStock keeping unit (unique identifier)
valueNoDeclared value of the product
weightNoWeight in ounces
widthNoWidth in inches

Implementation Reference

  • Handler function for the 'create_product' MCP tool. It invokes the ShipBob API via shipbobClient.createProduct and returns a formatted success or error response.
    handler: async (productData) => { try { const newProduct = await shipbobClient.createProduct(productData); return { content: [{ type: "text", text: `Product created successfully: ${JSON.stringify(newProduct, null, 2)}` }] }; } catch (error) { return { content: [{ type: "text", text: `Error creating product: ${error.message}` }], isError: true }; } }
  • Zod schema defining the input parameters for the create_product tool.
    schema: { name: z.string().describe("Product name"), sku: z.string().describe("Stock keeping unit (unique identifier)"), barcode: z.string().optional().describe("Product barcode/UPC"), description: z.string().optional().describe("Product description"), weight: z.number().optional().describe("Weight in ounces"), length: z.number().optional().describe("Length in inches"), width: z.number().optional().describe("Width in inches"), height: z.number().optional().describe("Height in inches"), value: z.number().optional().describe("Declared value of the product") },
  • src/server.js:50-50 (registration)
    Call to register the productTools array (which includes the create_product tool) with the MCP server.
    registerTools(productTools);
  • ShipBobClient.createProduct helper method that performs the actual POST API request to create a product.
    async createProduct(productData) { return this.request('POST', '/products', productData); }

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/mattcoatsworth/shipbob-mcp-server'

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