find_recipe_standards
Find standardized recipes and preparation methods for specific dishes using food service PDF guidelines.
Instructions
Find standardized recipes and preparation methods for specific dishes
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"dish_name": "<dish_name>"
},
"name": "find_recipe_standards"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dish_name | Yes | Name of the dish to find recipe standards for | |
| cuisine_type | No |
Implementation Reference
- src/index.js:455-501 (handler)Core handler function executing the tool logic: generates search terms based on dish_name and optional cuisine_type, searches PDF content via pdfParser, deduplicates results, and formats a text response with up to 8 standards.
async function findRecipeStandards(dish_name, cuisine_type) { const recipeTerms = [ dish_name, `рецепт ${dish_name}`, `стандарт ${dish_name}`, `приготовление ${dish_name}`, `recipe ${dish_name}`, `standard ${dish_name}`, `preparation ${dish_name}` ]; if (cuisine_type) { recipeTerms.push(`${cuisine_type} ${dish_name}`); } let allResults = []; for (const term of recipeTerms) { const results = pdfParser.searchContent(term); if (results.results) { allResults.push(...results.results); } } const uniqueResults = allResults.filter((result, index, self) => index === self.findIndex(r => r.content === result.content) ); let response = `Recipe standards for "${dish_name}"`; if (cuisine_type) response += ` (${cuisine_type} cuisine)`; response += ":\n\n"; if (uniqueResults.length === 0) { response += "No specific recipe standards found for this dish."; } else { uniqueResults.slice(0, 8).forEach((result, index) => { response += `Standard ${index + 1}:\n`; response += `${result.content}\n\n`; }); } return { content: [{ type: "text", text: response }] }; } - src/index.js:111-114 (schema)Zod schema for input validation of the tool's parameters: dish_name (required string) and cuisine_type (optional string). Converted to JSON schema for MCP.
const findRecipeStandardsSchema = z.object({ dish_name: z.string().describe("Name of the dish to find recipe standards for"), cuisine_type: z.string().optional().describe("Optional: type of cuisine or cooking style"), }); - src/index.js:197-200 (registration)Tool registration in the toolDefinitions array, including name, description, and inputSchema derived from Zod schema.
name: "find_recipe_standards", description: "Find standardized recipes and preparation methods for specific dishes", inputSchema: zodToJsonSchema(findRecipeStandardsSchema) } - src/tools.js:391-437 (handler)Alternative class method handler for the tool logic in GoodbookTools class (nearly identical to index.js implementation).
async findRecipeStandards(dishName, cuisineType = null) { const recipeTerms = [ dishName, `рецепт ${dishName}`, `стандарт ${dishName}`, `приготовление ${dishName}`, `recipe ${dishName}`, `standard ${dishName}`, `preparation ${dishName}` ]; if (cuisineType) { recipeTerms.push(`${cuisineType} ${dishName}`); } let allResults = []; for (const term of recipeTerms) { const results = this.pdfParser.searchContent(term); if (results.results) { allResults.push(...results.results); } } const uniqueResults = allResults.filter((result, index, self) => index === self.findIndex(r => r.content === result.content) ); let response = `Recipe standards for "${dishName}"`; if (cuisineType) response += ` (${cuisineType} cuisine)`; response += ":\n\n"; if (uniqueResults.length === 0) { response += "No specific recipe standards found for this dish."; } else { uniqueResults.slice(0, 8).forEach((result, index) => { response += `Standard ${index + 1}:\n`; response += `${result.content}\n\n`; }); } return { content: [{ type: "text", text: response }] }; } - src/tools.js:97-112 (registration)Tool definition/registration in GoodbookTools.getToolDefinitions(), with inline JSON schema.
name: "find_recipe_standards", description: "Find standardized recipes and preparation methods for specific dishes", inputSchema: { type: "object", properties: { dish_name: { type: "string", description: "Name of the dish to find recipe standards for" }, cuisine_type: { type: "string", description: "Optional: type of cuisine or cooking style" } }, required: ["dish_name"] }