get_fulfillment_center
Retrieve specific fulfillment center details from ShipBob's e-commerce fulfillment network using its unique identifier.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| centerId | Yes | The ID of the fulfillment center to retrieve |
Implementation Reference
- src/tools/location-tools.js:32-47 (handler)The handler function that implements the get_fulfillment_center MCP tool. It destructures centerId from input, fetches the fulfillment center using shipbobClient, stringifies the result as text content, or returns an error response.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' as a required string with description.schema: { centerId: z.string().describe("The ID of the fulfillment center to retrieve") },
- src/server.js:23-32 (registration)Helper function registerTools that registers each tool in an array to the MCP server by calling server.tool with the tool's name, schema, handler, and description.const registerTools = (toolsArray) => { toolsArray.forEach(tool => { server.tool( tool.name, tool.schema, tool.handler, { description: tool.description } ); }); };
- src/server.js:56-56 (registration)Call to register the locationTools array to the MCP server, which includes the get_fulfillment_center tool.registerTools(locationTools);
- src/api-client.js:149-151 (helper)ShipBobClient method used by the tool handler to fetch fulfillment center details via GET /fulfillment_centers/{id} API endpoint.async getFulfillmentCenter(id) { return this.request('GET', `/fulfillment_centers/${id}`); }