get_categories
Retrieve all product categories to filter ethical, origin-verified products. Browse Canadian, sustainable, vegan, and cruelty-free options from 30+ countries.
Instructions
List all supported product categories that can be used to filter products and brands.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_categories"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/staticData.js:37-43 (handler)The handleGetCategories function executes the tool logic, returning CANONICAL_CATEGORIES array with count and usage instructions
export function handleGetCategories() { return { categories: CANONICAL_CATEGORIES, total: CANONICAL_CATEGORIES.length, usage: 'Pass a category name in the "category" field when calling search_products or search_brands.' }; } - src/tools/staticData.js:28-35 (schema)The getCategoriesTool object defines the tool schema with name, description, and empty input schema
export const getCategoriesTool = { name: 'get_categories', description: 'List all supported product categories that can be used to filter products and brands.', inputSchema: { type: 'object', properties: {} } }; - src/index.js:59-68 (registration)Tool registration in the ListTools handler - getCategoriesTool is included in the tools array
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [ searchProductsTool, searchBrandsTool, refineSearchTool, getValuesTool, getCategoriesTool, getCountriesTool ] })); - src/index.js:94-96 (registration)Tool dispatch case in CallTool handler - routes 'get_categories' calls to handleGetCategories
case 'get_categories': result = handleGetCategories(); break; - src/types.js:17-21 (helper)CANONICAL_CATEGORIES constant array containing the category values returned by the tool
export const CANONICAL_CATEGORIES = [ 'Beauty', 'Personal Care', 'Baby', 'Health & Wellness', 'Supplements', 'Home & Kitchen', 'Cleaning', 'Food & Grocery', 'Beverages', 'Pet Care', 'Fashion', 'Accessories', 'Electronics', 'Office', 'Outdoors', 'Sports', 'Toys' ];