void_label
Cancel shipping labels in ShipStation by providing the shipment ID to stop shipments and manage logistics.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| shipmentId | Yes | Shipment ID of the label to void |
Implementation Reference
- src/tools/shipment-tools.js:81-93 (handler)The main handler function for the 'void_label' MCP tool. It takes a shipmentId, calls shipStationClient.voidLabel, and returns the JSON result or an error message.handler: async ({ shipmentId }) => { try { const result = await shipStationClient.voidLabel({ shipmentId }); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: error.message }], isError: true }; } }
- src/tools/shipment-tools.js:78-80 (schema)Zod input schema defining the required 'shipmentId' parameter as a number.schema: { shipmentId: z.number().describe("Shipment ID of the label to void") },
- src/server.js:184-191 (registration)MCP server registration loop that registers the 'void_label' tool (included via ...shipmentTools) using server.tool with its name, schema, handler, and description.].forEach(tool => { server.tool( tool.name, tool.schema, tool.handler, { description: tool.description } ); });
- src/api-client.js:97-99 (helper)Helper method in ShipStationClient that makes the POST request to ShipStation API endpoint '/shipments/voidlabel'.async voidLabel(data) { return this.request('POST', '/shipments/voidlabel', data); }