Skip to main content
Glama
WhenYouAreStrange

goodbook-mcp

get_cooking_guidelines

Retrieve cooking standards and preparation guidelines for specific dishes or cooking methods from food service documentation.

Instructions

Get cooking guidelines and standards for specific dishes or cooking methods

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dish_typeYesType of dish or cooking method to get guidelines for
sectionNo

Implementation Reference

  • The core handler function that implements the logic for the 'get_cooking_guidelines' tool. It constructs multiple search terms based on the input dish_type, queries the PDF parser for matches, removes duplicates, and returns formatted results.
    async function getCookingGuidelines(dish_type, section) { // Search for cooking-related terms const cookingTerms = [ dish_type, `приготовление ${dish_type}`, `готовка ${dish_type}`, `рецепт ${dish_type}`, `preparation ${dish_type}`, `cooking ${dish_type}`, `recipe ${dish_type}` ]; let allResults = []; for (const term of cookingTerms) { const results = pdfParser.searchContent(term, section); if (results.results) { allResults.push(...results.results); } } // Remove duplicates const uniqueResults = allResults.filter((result, index, self) => index === self.findIndex(r => r.content === result.content) ); let response = `Cooking guidelines for "${dish_type}":\n\n`; if (uniqueResults.length === 0) { response += "No specific cooking guidelines found for this dish type."; } else { uniqueResults.slice(0, 10).forEach((result, index) => { response += `Guideline ${index + 1}:\n`; response += `${result.content}\n\n`; }); } return { content: [{ type: "text", text: response }] }; }
  • Zod schema defining the input parameters for the get_cooking_guidelines tool: dish_type (required string) and optional section.
    const getCookingGuidelinesSchema = z.object({ dish_type: z.string().describe("Type of dish or cooking method to get guidelines for"), section: z.string().optional().describe("Optional: specific section to look in"), });
  • src/index.js:172-176 (registration)
    Tool definition/registration object included in the list of toolDefinitions used for the list_tools MCP request.
    { name: "get_cooking_guidelines", description: "Get cooking guidelines and standards for specific dishes or cooking methods", inputSchema: zodToJsonSchema(getCookingGuidelinesSchema) },
  • src/index.js:227-230 (registration)
    Dispatcher case in the CallToolRequestSchema handler that validates input using the schema and invokes the getCookingGuidelines handler function.
    case "get_cooking_guidelines": { const { dish_type, section } = getCookingGuidelinesSchema.parse(args); return await getCookingGuidelines(dish_type, section); }

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/WhenYouAreStrange/goodbook-mcp'

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