Skip to main content
Glama
mattcoatsworth

ShipStation API MCP Server

list_carrier_packages

Retrieve available package types for a specific carrier using the ShipStation API. Input the carrier code to generate a list of valid packages for shipping management.

Input Schema

NameRequiredDescriptionDefault
carrierCodeYesCarrier code (e.g., 'ups', 'fedex', 'usps')

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "carrierCode": { "description": "Carrier code (e.g., 'ups', 'fedex', 'usps')", "type": "string" } }, "required": [ "carrierCode" ], "type": "object" }

Implementation Reference

  • The handler function for the list_carrier_packages tool. It fetches packages for the given carrierCode using shipStationClient and returns formatted JSON or an error response.
    handler: async ({ carrierCode }) => { try { const packages = await shipStationClient.getCarrierPackages(carrierCode); return { content: [{ type: "text", text: JSON.stringify(packages, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: error.message }], isError: true }; } }
  • Input schema using Zod for the carrierCode parameter.
    schema: { carrierCode: z.string().describe("Carrier code (e.g., 'ups', 'fedex', 'usps')") },
  • src/server.js:174-191 (registration)
    Registration of all tools, including list_carrier_packages from carrierTools array, using the MCP server's tool() method.
    [ ...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