Skip to main content
Glama

get_inventory_levels

Retrieve real-time inventory levels across ShipBob fulfillment centers with pagination support. Use to monitor stock quantities and optimize inventory management for e-commerce operations.

Input Schema

NameRequiredDescriptionDefault
limitNoNumber of items per page
pageNoPage number for pagination

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "limit": { "description": "Number of items per page", "type": "number" }, "page": { "description": "Page number for pagination", "type": "number" } }, "type": "object" }

Implementation Reference

  • The handler function for the get_inventory_levels tool. It accepts pagination parameters, fetches inventory levels using shipbobClient, and returns formatted JSON or error message.
    handler: async ({ page, limit }) => { try { const params = { page, limit }; const levels = await shipbobClient.getInventoryLevels(params); return { content: [{ type: "text", text: JSON.stringify(levels, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error retrieving inventory levels: ${error.message}` }], isError: true }; } }
  • Input schema using Zod for optional page and limit parameters.
    schema: { page: z.number().optional().describe("Page number for pagination"), limit: z.number().optional().describe("Number of items per page") },
  • src/server.js:52-52 (registration)
    Registration of the inventoryTools array (containing get_inventory_levels) with the MCP server via registerTools.
    registerTools(inventoryTools);
  • Supporting API client method that makes the HTTP request to retrieve inventory levels from the ShipBob API.
    async getInventoryLevels(params) { return this.request('GET', '/inventory/levels', null, params); }

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