Skip to main content
Glama
mattcoatsworth

ShipStation API MCP Server

update_product

Update product details in ShipStation by providing the product ID and JSON data for the new product information.

Input Schema

NameRequiredDescriptionDefault
productDataYesJSON string containing the updated product data
productIdYesProduct ID to update

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "productData": { "description": "JSON string containing the updated product data", "type": "string" }, "productId": { "description": "Product ID to update", "type": "number" } }, "required": [ "productId", "productData" ], "type": "object" }

Implementation Reference

  • The main handler function for the 'update_product' tool. Parses the productData JSON string and calls shipStationClient.updateProduct, returning formatted JSON response or error.
    handler: async ({ productId, productData }) => { try { const parsedData = JSON.parse(productData); const result = await shipStationClient.updateProduct(productId, parsedData); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: error.message }], isError: true }; } } },
  • Zod input schema validation for the update_product tool inputs.
    schema: { productId: z.number().describe("Product ID to update"), productData: z.string().describe("JSON string containing the updated product data") },
  • src/server.js:174-191 (registration)
    Registration of all tools, including 'update_product' from productTools array, using server.tool() in a loop.
    [ ...orderTools, ...shipmentTools, ...carrierTools, ...warehouseTools, ...productTools, ...customerTools, ...storeTools, ...webhookTools, ...fulfillmentTools ].forEach(tool => { server.tool( tool.name, tool.schema, tool.handler, { description: tool.description } ); });
  • ShipStationClient helper method that performs the actual PUT API request to update a product.
    async updateProduct(productId, data) { return this.request('PUT', `/products/${productId}`, data); }

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

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