Skip to main content
Glama
mattcoatsworth

ShipStation API MCP Server

list_products

Fetch and filter product data from ShipStation API by SKU, name, category, or status. Control pagination, sorting, and include inactive products for streamlined inventory management.

Input Schema

NameRequiredDescriptionDefault
nameNoFilter by product name
pageNoPage number
pageSizeNoNumber of products per page (max 500)
productCategoryIdNoFilter by product category ID
showInactiveNoInclude inactive products
skuNoFilter by SKU
sortByNoSort products by a specific field
sortDirNoSort direction

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "name": { "description": "Filter by product name", "type": "string" }, "page": { "description": "Page number", "type": "number" }, "pageSize": { "description": "Number of products per page (max 500)", "type": "number" }, "productCategoryId": { "description": "Filter by product category ID", "type": "number" }, "showInactive": { "description": "Include inactive products", "type": "boolean" }, "sku": { "description": "Filter by SKU", "type": "string" }, "sortBy": { "description": "Sort products by a specific field", "type": "string" }, "sortDir": { "description": "Sort direction", "enum": [ "ASC", "DESC" ], "type": "string" } }, "type": "object" }

Implementation Reference

  • The handler function that implements the core logic of the 'list_products' tool. It fetches products using shipStationClient.getProducts(params) and returns a JSON-formatted response or an error message.
    handler: async (params) => { try { const products = await shipStationClient.getProducts(params); return { content: [{ type: "text", text: JSON.stringify(products, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: error.message }], isError: true }; } }
  • Zod schema defining the input parameters for the list_products tool, including optional filters for pagination, sorting, SKU, name, category, and inactive products.
    schema: { page: z.number().optional().describe("Page number"), pageSize: z.number().optional().describe("Number of products per page (max 500)"), sortBy: z.string().optional().describe("Sort products by a specific field"), sortDir: z.enum(["ASC", "DESC"]).optional().describe("Sort direction"), sku: z.string().optional().describe("Filter by SKU"), name: z.string().optional().describe("Filter by product name"), productCategoryId: z.number().optional().describe("Filter by product category ID"), showInactive: z.boolean().optional().describe("Include inactive products") },
  • src/server.js:184-191 (registration)
    The MCP server registration loop that dynamically registers the 'list_products' tool (included via ...productTools spread at line 179) using server.tool with its name, schema, handler, and description.
    ].forEach(tool => { server.tool( tool.name, tool.schema, tool.handler, { description: tool.description } ); });
  • Helper method in ShipStationClient that handles the actual API request to retrieve products from the /products endpoint, passing parameters for filtering and pagination.
    async getProducts(params) { return this.request('GET', '/products', 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/shipstation-mcp-server'

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