list_fulfillment_centers
Retrieve a list of fulfillment centers from the ShipBob API to manage and track inventory locations, enabling efficient order fulfillment and logistics planning.
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/location-tools.js:9-24 (handler)The handler function that implements the core logic of the 'list_fulfillment_centers' tool. It fetches the list of fulfillment centers using the ShipBob client and returns them as a JSON-formatted text response, or an error message if the call fails.handler: async () => { try { const centers = await shipbobClient.getFulfillmentCenters(); return { content: [{ type: "text", text: JSON.stringify(centers, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error listing fulfillment centers: ${error.message}` }], isError: true }; } }
- src/tools/location-tools.js:8-8 (schema)The input schema for the tool, defined as an empty object since the tool requires no input parameters.schema: {},
- src/server.js:56-56 (registration)Registers the 'locationTools' array (containing the 'list_fulfillment_centers' tool) with the MCP server via the registerTools helper function.registerTools(locationTools);
- src/tools/location-tools.js:5-25 (registration)The complete tool object definition for 'list_fulfillment_centers' within the exported locationTools array, serving as the primary registration point for the tool's metadata, schema, and handler.{ name: "list_fulfillment_centers", description: "List all fulfillment centers in ShipBob network", schema: {}, handler: async () => { try { const centers = await shipbobClient.getFulfillmentCenters(); return { content: [{ type: "text", text: JSON.stringify(centers, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error listing fulfillment centers: ${error.message}` }], isError: true }; } } },