Skip to main content
Glama
mattcoatsworth

ShipStation API MCP Server

void_label

Cancel shipping labels in ShipStation by providing the shipment ID to stop shipments and manage logistics.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
shipmentIdYesShipment ID of the label to void

Implementation Reference

  • 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 }; } }
  • 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 } ); });
  • 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); }

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