list_carrier_services
Retrieve available shipping services for a specific carrier by providing its carrier code, enabling efficient management of shipping options within the ShipStation API MCP Server.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| carrierCode | Yes | Carrier 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
- src/tools/carrier-tools.js:49-61 (handler)Handler function that fetches and returns carrier services for the given carrierCode using shipStationClient, or an error message if failed.handler: async ({ carrierCode }) => { try { const services = await shipStationClient.getCarrierServices(carrierCode); return { content: [{ type: "text", text: JSON.stringify(services, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: error.message }], isError: true }; } }
- src/tools/carrier-tools.js:46-48 (schema)Zod schema defining the input parameter 'carrierCode' as a string.schema: { carrierCode: z.string().describe("Carrier code (e.g., 'ups', 'fedex', 'usps')") },
- src/server.js:174-191 (registration)Registration loop that spreads carrierTools (among others) and registers each tool with the MCP server using server.tool().[ ...orderTools, ...shipmentTools, ...carrierTools, ...warehouseTools, ...productTools, ...customerTools, ...storeTools, ...webhookTools, ...fulfillmentTools ].forEach(tool => { server.tool( tool.name, tool.schema, tool.handler, { description: tool.description } ); });