list_warehouses
Retrieve a list of warehouses to manage and organize inventory locations within the ShipStation API, enabling efficient order fulfillment and logistics operations.
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/warehouse-tools.js:9-21 (handler)The main handler function for the list_warehouses tool. It calls shipStationClient.getWarehouses() and returns the JSON stringified result or error message.handler: async () => { try { const warehouses = await shipStationClient.getWarehouses(); return { content: [{ type: "text", text: JSON.stringify(warehouses, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: error.message }], isError: true }; } }
- src/tools/warehouse-tools.js:6-8 (schema)Tool definition including name, description, and empty input schema indicating no parameters are required.name: "list_warehouses", description: "List all warehouses", schema: {},
- src/server.js:174-191 (registration)Registration of all tools, including those from warehouseTools (which contains list_warehouses), to the MCP server via server.tool().[ ...orderTools, ...shipmentTools, ...carrierTools, ...warehouseTools, ...productTools, ...customerTools, ...storeTools, ...webhookTools, ...fulfillmentTools ].forEach(tool => { server.tool( tool.name, tool.schema, tool.handler, { description: tool.description } ); });
- src/api-client.js:115-117 (helper)Supporting helper method in ShipStationClient that performs the actual API call to retrieve warehouses.async getWarehouses() { return this.request('GET', '/warehouses'); }