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"]
      }
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves guidelines but offers no details on permissions, rate limits, response format, or potential side effects. For a tool with no annotations, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded and clear, though it could benefit from additional structure or bullet points if more details were included.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (2 parameters, no output schema, no annotations), the description is incomplete. It lacks information on return values, error handling, and how parameters interact, making it insufficient for an agent to fully understand the tool's context and usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 50%, with 'dish_type' documented but 'section' lacking a description. The tool description implies parameters relate to dishes or cooking methods, adding some context beyond the schema, but it doesn't fully compensate for the undocumented 'section' parameter or provide detailed semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Get') and resource ('cooking guidelines and standards'), and specifies the target ('for specific dishes or cooking methods'). However, it doesn't explicitly differentiate from sibling tools like 'find_recipe_standards' or 'get_food_safety_info', which appear related but have distinct purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With sibling tools like 'find_recipe_standards' and 'get_food_safety_info' available, there is no indication of how this tool differs in context or when it should be preferred over others, leaving usage ambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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