Skip to main content
Glama
mattcoatsworth

ShipStation API MCP Server

create_label

Generate shipping labels for orders by providing label data in JSON format to streamline fulfillment processes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelDataYesJSON string containing the label data

Implementation Reference

  • Handler function for the 'create_label' MCP tool. Parses the labelData JSON string and delegates to shipStationClient.createLabel(), returning the result or error response.
    handler: async ({ labelData }) => { try { const parsedData = JSON.parse(labelData); const result = await shipStationClient.createLabel(parsedData); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: error.message }], isError: true }; } }
  • Input schema for the create_label tool, defining labelData as a JSON string using Zod.
    schema: { labelData: z.string().describe("JSON string containing the label data") },
  • src/server.js:174-191 (registration)
    Registers all MCP tools including the 'create_label' tool from shipmentTools array by iterating and calling server.tool().
    [ ...orderTools, ...shipmentTools, ...carrierTools, ...warehouseTools, ...productTools, ...customerTools, ...storeTools, ...webhookTools, ...fulfillmentTools ].forEach(tool => { server.tool( tool.name, tool.schema, tool.handler, { description: tool.description } ); });
  • ShipStationClient.createLabel method invoked by the tool handler, which sends a POST request to the ShipStation API endpoint '/shipments/createlabel'.
    async createLabel(data) { return this.request('POST', '/shipments/createlabel', 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