list_carriers
Retrieve available shipping carriers from ShipStation to configure shipping options and rates for orders.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_carriers"
}
}Input 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'); }