Skip to main content
Glama
WhenYouAreStrange

goodbook-mcp

get_food_safety_info

Retrieve food safety guidelines and hygiene standards for specific topics like temperature control, storage practices, and sanitation procedures.

Instructions

Get food safety information and hygiene standards

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topicYesSpecific food safety topic (temperature, storage, hygiene, etc.)

Implementation Reference

  • The core handler function that executes the get_food_safety_info tool. It generates safety-related search terms based on the input topic, searches the PDF content via pdfParser, removes duplicates, and returns formatted results.
    async function getFoodSafetyInfo(topic) {
      const safetyTerms = [
        topic,
        `безопасность ${topic}`,
        `гигиена ${topic}`,
        `санитария ${topic}`,
        `температура ${topic}`,
        `хранение ${topic}`,
        `safety ${topic}`,
        `hygiene ${topic}`,
        `sanitation ${topic}`,
        `temperature ${topic}`,
        `storage ${topic}`
      ];
    
      let allResults = [];
      for (const term of safetyTerms) {
        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 = `Food safety information for "${topic}":\n\n`;
      
      if (uniqueResults.length === 0) {
        response += "No specific food safety information found for this topic.";
      } else {
        uniqueResults.slice(0, 8).forEach((result, index) => {
          response += `Safety guideline ${index + 1}:\n`;
          response += `${result.content}\n\n`;
        });
      }
    
      return {
        content: [{
          type: "text",
          text: response
        }]
      };
    }
  • Zod schema used for input validation of the tool's 'topic' parameter.
    const getFoodSafetyInfoSchema = z.object({
      topic: z.string().describe("Specific food safety topic (temperature, storage, hygiene, etc.)"),
    });
  • src/index.js:191-195 (registration)
    Registration of the tool in the MCP server's toolDefinitions array, including name, description, and derived JSON input schema.
    {
      name: "get_food_safety_info",
      description: "Get food safety information and hygiene standards",
      inputSchema: zodToJsonSchema(getFoodSafetyInfoSchema)
    },
  • Alternative class method implementation of the handler in GoodbookTools class, identical logic to the index.js version.
    async getFoodSafetyInfo(topic) {
      const safetyTerms = [
        topic,
        `безопасность ${topic}`,
        `гигиена ${topic}`,
        `санитария ${topic}`,
        `температура ${topic}`,
        `хранение ${topic}`,
        `safety ${topic}`,
        `hygiene ${topic}`,
        `sanitation ${topic}`,
        `temperature ${topic}`,
        `storage ${topic}`
      ];
    
      let allResults = [];
      for (const term of safetyTerms) {
        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 = `Food safety information for "${topic}":\n\n`;
      
      if (uniqueResults.length === 0) {
        response += "No specific food safety information found for this topic.";
      } else {
        uniqueResults.slice(0, 8).forEach((result, index) => {
          response += `Safety guideline ${index + 1}:\n`;
          response += `${result.content}\n\n`;
        });
      }
    
      return {
        content: [{
          type: "text",
          text: response
        }]
      };
    }
  • src/tools.js:82-95 (registration)
    Inline JSON schema and registration in the getToolDefinitions() method of GoodbookTools class.
    {
      name: "get_food_safety_info",
      description: "Get food safety information and hygiene standards",
      inputSchema: {
        type: "object",
        properties: {
          topic: {
            type: "string",
            description: "Specific food safety topic (temperature, storage, hygiene, etc.)"
          }
        },
        required: ["topic"]
      }
    },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves information but doesn't mention whether it's read-only, requires authentication, has rate limits, or what the output format might be. This is inadequate for a tool with no annotation coverage.

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

Conciseness5/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 function without unnecessary words. It's appropriately sized and front-loaded, making it easy to parse quickly.

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 lack of annotations and output schema, the description is insufficient. It doesn't explain what the tool returns, potential errors, or behavioral traits, leaving gaps in understanding for an AI agent despite the simple parameter schema.

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?

The input schema has 100% description coverage, with the 'topic' parameter well-documented. The description adds no additional parameter details beyond what the schema provides, so it meets the baseline of 3 for high schema coverage without extra value.

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 action ('Get') and the resource ('food safety information and hygiene standards'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'find_recipe_standards' or 'search_food_standards', which might overlap in domain.

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?

No guidance is provided on when to use this tool versus alternatives such as 'find_recipe_standards' or 'search_food_standards'. The description lacks context about specific use cases or exclusions, leaving the agent to infer usage.

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