list_carriers
Retrieve available shipping carriers from ShipStation to configure shipping options and rates for orders.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/carrier-tools.js:9-21 (handler)The MCP tool handler function for 'list_carriers'. It calls shipStationClient.getCarriers(), stringifies the result as JSON, and returns it in the expected MCP format, or an error message if failed.handler: async () => { try { const carriers = await shipStationClient.getCarriers(); return { content: [{ type: "text", text: JSON.stringify(carriers, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: error.message }], isError: true }; } }
- src/tools/carrier-tools.js:8-8 (schema)The Zod schema for the tool, which is empty indicating no input parameters are required.schema: {},
- src/server.js:184-191 (registration)The registration loop in the MCP server that registers the 'list_carriers' tool (included via ...carrierTools in the array) by calling server.tool with its name, schema, handler, and description.].forEach(tool => { server.tool( tool.name, tool.schema, tool.handler, { description: tool.description } ); });
- src/api-client.js:102-104 (helper)Supporting method in ShipStationClient that performs the actual API call to retrieve carriers (GET /carriers), used by the tool handler.async getCarriers() { return this.request('GET', '/carriers'); }