Skip to main content
Glama

list_products

Retrieve product listings from ShipBob's fulfillment system with pagination and search filters to manage inventory efficiently.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number for pagination
limitNoNumber of products per page
searchNoSearch term to filter products

Implementation Reference

  • The handler function for the 'list_products' tool. It constructs parameters from input, calls shipbobClient.getProducts(), formats the response as JSON text, and handles errors.
    handler: async ({ page, limit, search }) => { try { const params = { page, limit, search }; const products = await shipbobClient.getProducts(params); return { content: [{ type: "text", text: JSON.stringify(products, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error listing products: ${error.message}` }], isError: true }; }
  • Zod schema defining optional input parameters for the list_products tool: page, limit, and search.
    schema: { page: z.number().optional().describe("Page number for pagination"), limit: z.number().optional().describe("Number of products per page"), search: z.string().optional().describe("Search term to filter products") },
  • src/server.js:50-50 (registration)
    Registers the productTools array (containing list_products and other product tools) with the MCP server using the registerTools utility.
    registerTools(productTools);
  • src/server.js:23-32 (registration)
    Utility function used to register each tool from an array to the MCP server by calling server.tool() for name, schema, handler, and description.
    const registerTools = (toolsArray) => { toolsArray.forEach(tool => { server.tool( tool.name, tool.schema, tool.handler, { description: tool.description } ); }); };

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