Skip to main content
Glama
mattcoatsworth

ShipStation API MCP Server

void_label

Cancel shipping labels in ShipStation by submitting the shipment ID directly via the API. Simplify label voiding for order management and fulfillment workflows.

Input Schema

NameRequiredDescriptionDefault
shipmentIdYesShipment ID of the label to void

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "shipmentId": { "description": "Shipment ID of the label to void", "type": "number" } }, "required": [ "shipmentId" ], "type": "object" }

Implementation Reference

  • Handler function for the 'void_label' MCP tool. Takes shipmentId, calls shipStationClient.voidLabel, returns JSON result or error response.
    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 }; } }
  • Zod input schema for 'void_label' tool: requires a numeric shipmentId.
    schema: { shipmentId: z.number().describe("Shipment ID of the label to void") },
  • Tool registration object for 'void_label' exported as part of shipmentTools array, later spread and registered in MCP server.
    { name: "void_label", description: "Void a shipping label", schema: { shipmentId: z.number().describe("Shipment ID of the label to void") }, 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 }; } } }
  • ShipStationClient helper method voidLabel that performs the actual POST request to ShipStation API endpoint /shipments/voidlabel.
    async voidLabel(data) { return this.request('POST', '/shipments/voidlabel', data); }
  • src/server.js:174-191 (registration)
    MCP server registration code that spreads shipmentTools (containing void_label) and calls server.tool for each tool.
    [ ...orderTools, ...shipmentTools, ...carrierTools, ...warehouseTools, ...productTools, ...customerTools, ...storeTools, ...webhookTools, ...fulfillmentTools ].forEach(tool => { server.tool( tool.name, tool.schema, tool.handler, { description: tool.description } ); });

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