delete_product
Remove products from ShipStation inventory by specifying the product ID to maintain accurate stock levels and product listings.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| productId | Yes | Product ID to delete |
Implementation Reference
- src/tools/product-tools.js:101-113 (handler)The main handler function for the delete_product tool, which calls the ShipStation API client to delete the product and returns the formatted response or error.handler: async ({ productId }) => { try { const result = await shipStationClient.deleteProduct(productId); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: error.message }], isError: true }; } }
- src/tools/product-tools.js:98-100 (schema)Zod input schema for the delete_product tool, requiring a productId (number).schema: { productId: z.number().describe("Product ID to delete") },
- src/server.js:174-191 (registration)Registers all tool sets including productTools (containing delete_product) on the MCP server using server.tool().[ ...orderTools, ...shipmentTools, ...carrierTools, ...warehouseTools, ...productTools, ...customerTools, ...storeTools, ...webhookTools, ...fulfillmentTools ].forEach(tool => { server.tool( tool.name, tool.schema, tool.handler, { description: tool.description } ); });
- src/api-client.js:152-154 (helper)ShipStationClient helper method that sends DELETE request to ShipStation API endpoint /products/{productId}.async deleteProduct(productId) { return this.request('DELETE', `/products/${productId}`); }