Skip to main content
Glama
WhenYouAreStrange

goodbook-mcp

get_cooking_guidelines

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

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

  • Executes the get_cooking_guidelines tool by generating multiple search terms (dish_type and variations in English/Russian), searching the PDF via pdfParser.searchContent, deduplicating results, and returning a formatted text response with up to 10 guidelines.
    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 for input validation: requires 'dish_type' string, optional 'section' string.
    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)
    Registers the tool in the MCP toolDefinitions array used by the server, specifying name, description, and input schema converted from Zod.
    { name: "get_cooking_guidelines", description: "Get cooking guidelines and standards for specific dishes or cooking methods", inputSchema: zodToJsonSchema(getCookingGuidelinesSchema) },
  • Alternative class-based handler method in GoodbookTools class, identical logic to index.js version, using this.pdfParser.
    async getCookingGuidelines(dishType, section = null) { // Search for cooking-related terms const cookingTerms = [ dishType, `приготовление ${dishType}`, `готовка ${dishType}`, `рецепт ${dishType}`, `preparation ${dishType}`, `cooking ${dishType}`, `recipe ${dishType}` ]; let allResults = []; for (const term of cookingTerms) { const results = this.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 "${dishType}":\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 }] }; }
  • src/tools.js:37-54 (registration)
    Tool definition including inline JSON schema, returned by GoodbookTools.getToolDefinitions() method.
    { name: "get_cooking_guidelines", description: "Get cooking guidelines and standards for specific dishes or cooking methods", inputSchema: { type: "object", properties: { dish_type: { type: "string", description: "Type of dish or cooking method to get guidelines for" }, section: { type: "string", description: "Optional: specific section to look in" } }, required: ["dish_type"] } },

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