list_all_perfumes
Retrieve a comprehensive list of all perfumes available in the Blue Perfumery collection to explore, compare, and select fragrances.
Instructions
List all perfumes in the Blue Perfumery collection
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:105-119 (handler)The handler logic for the 'list_all_perfumes' tool. It fetches all active perfumes from the Product model using Mongoose and returns a JSON-formatted response with the list.case "list_all_perfumes": { const perfumes = await Product.find({ status: "active" }).lean(); return { content: [ { type: "text", text: JSON.stringify({ success: true, count: perfumes.length, perfumes: perfumes, }, null, 2), }, ], }; }
- src/index.ts:29-37 (registration)Registration of the 'list_all_perfumes' tool in the ListToolsRequestSchema handler, specifying name, description, and empty input schema.{ name: "list_all_perfumes", description: "List all perfumes in the Blue Perfumery collection", inputSchema: { type: "object", properties: {}, required: [], }, },
- src/index.ts:32-36 (schema)Input schema for the 'list_all_perfumes' tool, which requires no parameters (empty object).inputSchema: { type: "object", properties: {}, required: [], },
- src/index.ts:11-11 (helper)Import of the Product Mongoose model used in the tool handler for database queries.import { Product, type Perfume } from "./models/Product.js";