get_menu_categories
Retrieve all menu categories from For Five Coffee café to organize and navigate available food and beverage options.
Instructions
Get all available menu categories
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_menu_categories"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- server.js:1048-1066 (handler)The main execution function for the 'get_menu_categories' tool. Fetches the menu data (from cache or live sources) and returns a JSON response containing all available menu categories and the total count.
async getMenuCategories() { const menuData = await this.fetchMenuData(); return { content: [ { type: 'text', text: JSON.stringify( { categories: menuData.categories, totalCategories: menuData.categories.length, }, null, 2 ), }, ], }; } - server.js:68-71 (schema)The input schema for the tool, specifying an empty object (no parameters required). Part of the tool definition in the MCP ListTools response.
inputSchema: { type: 'object', properties: {}, }, - server.js:65-72 (registration)Tool registration in the MCP ListToolsRequestSchema handler, defining the tool's name, description, and schema for discovery.
{ name: 'get_menu_categories', description: 'Get all available menu categories', inputSchema: { type: 'object', properties: {}, }, }, - server.js:107-108 (registration)Tool dispatch registration in the MCP CallToolRequestSchema switch statement, routing calls to the handler function.
case 'get_menu_categories': return await this.getMenuCategories(); - server.js:324-325 (registration)Additional tool dispatch registration in the HTTP /mcp endpoint's tools/call handler.
case 'get_menu_categories': result = await this.getMenuCategories();