list_warehouses
Retrieve warehouse information from ShipStation to manage inventory locations and fulfillment operations.
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_warehouses"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/warehouse-tools.js:9-21 (handler)The handler function for the 'list_warehouses' tool. It calls shipStationClient.getWarehouses() to fetch all warehouses, returns them as formatted JSON text, or an error message if failed.
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:8-8 (schema)The schema definition for the 'list_warehouses' tool, which is empty indicating no input parameters are required.
schema: {}, - src/tools/warehouse-tools.js:5-22 (registration)The complete tool object definition for 'list_warehouses' within the warehouseTools array, which is later registered.
{ name: "list_warehouses", description: "List all warehouses", schema: {}, 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/server.js:173-191 (registration)Registration code that spreads the warehouseTools array (containing list_warehouses) and registers each tool with the MCP server using server.tool().
// Register all tools [ ...orderTools, ...shipmentTools, ...carrierTools, ...warehouseTools, ...productTools, ...customerTools, ...storeTools, ...webhookTools, ...fulfillmentTools ].forEach(tool => { server.tool( tool.name, tool.schema, tool.handler, { description: tool.description } ); }); - src/tools/index.js:4-4 (registration)Re-export of the warehouseTools array from warehouse-tools.js to make it available for import in server.js.
export { default as warehouseTools } from './warehouse-tools.js';