get_fulfillment_center
Retrieve detailed information about a specific fulfillment center using its ID, enabling efficient management of e-commerce fulfillment operations via ShipBob API.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| centerId | Yes | The ID of the fulfillment center to retrieve |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"centerId": {
"description": "The ID of the fulfillment center to retrieve",
"type": "string"
}
},
"required": [
"centerId"
],
"type": "object"
}
Implementation Reference
- src/tools/location-tools.js:32-47 (handler)Handler function that retrieves a specific fulfillment center using the ShipBob client and returns its details as JSON or an error message.handler: async ({ centerId }) => { try { const center = await shipbobClient.getFulfillmentCenter(centerId); return { content: [{ type: "text", text: JSON.stringify(center, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error retrieving fulfillment center: ${error.message}` }], isError: true }; } }
- src/tools/location-tools.js:29-31 (schema)Zod schema defining the input parameter 'centerId' for the get_fulfillment_center tool.schema: { centerId: z.string().describe("The ID of the fulfillment center to retrieve") },
- src/server.js:56-58 (registration)Registration of locationTools (including get_fulfillment_center) to the MCP server via registerTools function call.registerTools(locationTools); registerTools(channelTools); registerTools(reportingTools);
- src/api-client.js:149-151 (helper)ShipBobClient helper method that makes the API request to fetch a specific fulfillment center by ID.async getFulfillmentCenter(id) { return this.request('GET', `/fulfillment_centers/${id}`); }
- src/server.js:23-32 (helper)Utility function that registers each tool in the array to the MCP server using server.tool.const registerTools = (toolsArray) => { toolsArray.forEach(tool => { server.tool( tool.name, tool.schema, tool.handler, { description: tool.description } ); }); };