Skip to main content
Glama

get_fulfillment_center

Retrieve specific fulfillment center details from ShipBob's e-commerce fulfillment network using its unique identifier.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
centerIdYesThe ID of the fulfillment center to retrieve

Implementation Reference

  • 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
        };
      }
    }
  • 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);
  • 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}`);
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mattcoatsworth/shipbob-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server