Skip to main content
Glama

get_risk_assessments

Retrieve quantitative safety assessments including ADI, TDI, and safety limit values for food substances from EFSA's OpenFoodTox database by hazard ID.

Instructions

Get risk assessment data from CHEM_ASSESS table by HAZARD_ID.

Retrieves comprehensive risk assessment records including ADI (Acceptable Daily Intake),
TDI (Tolerable Daily Intake), and other safety limit values. This tool provides the
quantitative safety assessments used by EFSA to establish safe intake levels for
food substances.

Args:
    hazard_id: Single HAZARD_ID (int) or list of HAZARD_IDs (list[int]) to query.
              Use search_substance tool first to find HAZARD_IDs through the STUDY table.

Returns:
    JSON string containing a DataFrame with risk assessment records. Each record
    includes assessment type, risk values, units, safety factors, and population
    information.

The returned data includes:
- Assessment type: ASSESSMENTTYPE (e.g., ADI, TDI, ARfD)
- Risk values: RISKVALUE, RISKVALUE_MILLI, RISKUNIT, RISKUNIT_MILLI
- Risk qualifier: RISKQUALIFIER (e.g., "not specified", "group")
- Safety factors: SAFETY_FACTOR
- Population: ID_POPULATION, POPULATIONTEXT
- Assessment details: ASSESS, REMARKS
- Group assessments: COM_GROUP_ID, GROUP_UNIT, GROUP_REMARKS

Note: Multiple records may be returned if multiple HAZARD_IDs are provided or if
a single hazard has multiple assessment types (e.g., both ADI and TDI).

<dictionary_descriptions>
<name>RISKQUALIFIER</name>
<description>Description of the qualifier for the reference value</description>
<name>RISKVALUE</name>
<description>Quantification of the reference value</description>
<name>RISKUNIT</name>
<description>Short description of the units of the reference value</description>
<name>RISKUNITFULLTEXT</name>
<description>Full description of the units of the reference value</description>
<name>RISKVALUE_MILLI</name>
<description>Full description of the units of the reference value when converted to milligrams</description>
<name>RISKUNIT_MILLI</name>
<description>Quantification of the reference value when converted to milligrams</description>
<name>SAFETY_FACTOR</name>
<description>Safety factor/Uncertainty factor used to derive the reference value</description>
<name>POPULATIONTEXT</name>
<description>Description of the population the reference value applies to</description>
<name>REMARKS</name>
<description>General comments</description>
<name>ASSESS</name>
<description>Assessment summarised where no reference value is set</description>
</dictionary_descriptions>

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hazard_idYes

Implementation Reference

  • The handler function that implements the get_risk_assessments tool. It queries the CHEM_ASSESS table using the provided hazard_id(s) and returns the risk assessment data as a JSON string.
    def get_risk_assessments(hazard_id: Union[int, list[int]]):
        """
        Get risk assessment data from CHEM_ASSESS table by HAZARD_ID.
    
        Retrieves comprehensive risk assessment records including ADI (Acceptable Daily Intake),
        TDI (Tolerable Daily Intake), and other safety limit values. This tool provides the
        quantitative safety assessments used by EFSA to establish safe intake levels for
        food substances.
    
        Args:
            hazard_id: Single HAZARD_ID (int) or list of HAZARD_IDs (list[int]) to query.
                      Use search_substance tool first to find HAZARD_IDs through the STUDY table.
    
        Returns:
            JSON string containing a DataFrame with risk assessment records. Each record
            includes assessment type, risk values, units, safety factors, and population
            information.
    
        The returned data includes:
        - Assessment type: ASSESSMENTTYPE (e.g., ADI, TDI, ARfD)
        - Risk values: RISKVALUE, RISKVALUE_MILLI, RISKUNIT, RISKUNIT_MILLI
        - Risk qualifier: RISKQUALIFIER (e.g., "not specified", "group")
        - Safety factors: SAFETY_FACTOR
        - Population: ID_POPULATION, POPULATIONTEXT
        - Assessment details: ASSESS, REMARKS
        - Group assessments: COM_GROUP_ID, GROUP_UNIT, GROUP_REMARKS
    
        Note: Multiple records may be returned if multiple HAZARD_IDs are provided or if
        a single hazard has multiple assessment types (e.g., both ADI and TDI).
    
        <dictionary_descriptions>
        <name>RISKQUALIFIER</name>
        <description>Description of the qualifier for the reference value</description>
        <name>RISKVALUE</name>
        <description>Quantification of the reference value</description>
        <name>RISKUNIT</name>
        <description>Short description of the units of the reference value</description>
        <name>RISKUNITFULLTEXT</name>
        <description>Full description of the units of the reference value</description>
        <name>RISKVALUE_MILLI</name>
        <description>Full description of the units of the reference value when converted to milligrams</description>
        <name>RISKUNIT_MILLI</name>
        <description>Quantification of the reference value when converted to milligrams</description>
        <name>SAFETY_FACTOR</name>
        <description>Safety factor/Uncertainty factor used to derive the reference value</description>
        <name>POPULATIONTEXT</name>
        <description>Description of the population the reference value applies to</description>
        <name>REMARKS</name>
        <description>General comments</description>
        <name>ASSESS</name>
        <description>Assessment summarised where no reference value is set</description>
        </dictionary_descriptions>
        """
        df = query_by_id(hazard_id, "chem_assess")
        return df.to_json()
  • main.py:19-19 (registration)
    Registers the get_risk_assessments tool with the FastMCP server instance.
    mcp.add_tool(get_risk_assessments)
  • main.py:3-3 (registration)
    Imports the get_risk_assessments handler function for registration.
    from src.mcp_openfoodtox.tools.get_risk_assessments import get_risk_assessments
Behavior3/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 describes the return format (JSON string with DataFrame) and notes that multiple records may be returned for multiple HAZARD_IDs or multiple assessment types. However, it lacks details on permissions, rate limits, error handling, or data freshness, which are important for a read operation 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.

Conciseness4/5

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

The description is well-structured and front-loaded with the core purpose, followed by detailed sections on arguments, returns, and notes. However, the inclusion of the lengthy <dictionary_descriptions> section adds redundancy, as it repeats field details that could be inferred from the return description, slightly reducing conciseness.

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

Completeness4/5

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

Given the tool's complexity (1 parameter, no output schema, no annotations), the description is mostly complete. It covers purpose, usage, parameters, and return format in detail. The main gap is the lack of behavioral context like error handling or performance, but it compensates with rich parameter and output explanations, making it adequate for agent use.

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

Parameters5/5

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

The description adds significant meaning beyond the input schema, which has 0% description coverage. It explains that 'hazard_id' can be a single integer or list of integers, and provides context on how to obtain these IDs via the 'search_substance' tool. This compensates fully for the schema's lack of parameter descriptions, making the semantics clear and actionable.

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

Purpose5/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: 'Get risk assessment data from CHEM_ASSESS table by HAZARD_ID' with specific details about retrieving comprehensive records including ADI, TDI, and safety limit values. It distinguishes from siblings by specifying the exact table and data type, unlike tools like 'get_genotox_details' or 'search_substance'.

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

Usage Guidelines4/5

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

The description provides clear usage guidance: 'Use search_substance tool first to find HAZARD_IDs through the STUDY table,' which explicitly directs to a sibling tool for prerequisite steps. However, it does not specify when to use this tool versus alternatives like 'get_substance_safety_assessment' or 'list_hazard_ids_by_assessment,' missing explicit exclusions or comparisons.

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/spyrosze/mcp-openfoodtox'

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