Skip to main content
Glama

list_products

Retrieve and filter product data from ShipBob's e-commerce fulfillment API using pagination and search terms for efficient product management.

Input Schema

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

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "limit": { "description": "Number of products per page", "type": "number" }, "page": { "description": "Page number for pagination", "type": "number" }, "search": { "description": "Search term to filter products", "type": "string" } }, "type": "object" }

Implementation Reference

  • The handler function for the 'list_products' tool. It accepts optional page, limit, and search parameters, calls shipbobClient.getProducts, and returns the products as JSON-formatted text or an error message.
    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 }; } }
  • Input schema for the 'list_products' tool using Zod, defining optional pagination and search parameters.
    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)
    Registration of the productTools array (including 'list_products') to the MCP server via the registerTools utility function.
    registerTools(productTools);

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