Skip to main content
Glama
Kong

For Five Coffee MCP Server

by Kong

search_menu_items

Find menu items by name or category to quickly locate specific drinks and food offerings from For Five Coffee café.

Instructions

Search for specific menu items by name or category

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch term to find in menu items (name, description, or category)

Implementation Reference

  • Core handler function for 'search_menu_items' tool. Fetches menu data, filters items matching the query in name, description, or category, and returns structured JSON response.
    async searchMenuItems(query) { const menuData = await this.fetchMenuData(); const searchTerm = query.toLowerCase(); const results = menuData.items.filter( item => item.name.toLowerCase().includes(searchTerm) || item.description.toLowerCase().includes(searchTerm) || item.category.toLowerCase().includes(searchTerm) ); return { content: [ { type: 'text', text: JSON.stringify( { query, resultsFound: results.length, items: results, }, null, 2 ), }, ], }; }
  • Input schema validation for the tool, requiring a 'query' string parameter.
    inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'Search term to find in menu items (name, description, or category)', }, }, required: ['query'], },
  • server.js:51-64 (registration)
    Registration of the 'search_menu_items' tool in the MCP ListToolsRequestSchema handler, including name, description, and schema.
    { name: 'search_menu_items', description: 'Search for specific menu items by name or category', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'Search term to find in menu items (name, description, or category)', }, }, required: ['query'], }, },
  • server.js:105-106 (registration)
    Dispatch/registration case in the CallToolRequestSchema handler that invokes the searchMenuItems method.
    case 'search_menu_items': return await this.searchMenuItems(args.query);
  • server.js:278-288 (registration)
    Secondary registration of the tool in the HTTP JSON-RPC /mcp tools/list response.
    { name: 'search_menu_items', description: 'Search for specific menu items by name or category', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'Search term to find in menu items' }, }, required: ['query'], }, },

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/Kong/menu-mpc'

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