list_carriers
Retrieve a detailed list of available carriers to facilitate shipping operations and optimize logistics management through the ShipStation API.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {},
"type": "object"
}
Implementation Reference
- src/tools/carrier-tools.js:9-21 (handler)The handler function that executes the list_carriers tool: fetches carriers from ShipStation API and returns formatted JSON or error message.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)Empty schema indicating the tool requires no input parameters.schema: {},
- src/tools/carrier-tools.js:5-22 (registration)Tool definition object for list_carriers, exported as part of carrierTools array.{ name: "list_carriers", description: "List all carriers available to the account", schema: {}, 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/server.js:184-191 (registration)Registration loop that adds all tools from various toolsets, including list_carriers from carrierTools, to the MCP server.].forEach(tool => { server.tool( tool.name, tool.schema, tool.handler, { description: tool.description } ); });