Skip to main content
Glama

get_toxicity_endpoints

Retrieve detailed toxicity endpoint data from EFSA's OpenFoodTox database, including NOAEL, LD50 values, study conditions, and target organ effects for chemical risk assessment.

Instructions

Get toxicity endpoint study data from ENDPOINT_STUDY table by TOX_ID.

Retrieves detailed toxicity endpoint records including NOAEL, LD50, and other
toxicity measurements from animal and in vitro studies. This tool provides the
experimental data used to assess the toxicological effects of food substances.

Args:
    tox_id: Single TOX_ID (int) or list of TOX_IDs (list[int]) to query.
           Use search_substance tool first to find TOX_IDs through the STUDY table.

Returns:
    JSON string containing a DataFrame with toxicity endpoint records. Each record
    includes endpoint type, toxicity values, study conditions, and target organs.

The returned data includes:
- Endpoint information: ENDPOINT, ENDPOINT_CODE (e.g., NOAEL, LD50, LOAEL)
- Toxicity values: VALUE, VALUE_MILLI, DOSEUNIT, DOSEUNITFULLTEXT
- Qualifier: QUALIFIER (e.g., "greater than", "less than")
- Study conditions: SPECIES, STRAIN, SEX, ROUTE, EXP_DURATION, DURATIONUNIT
- Target information: TARGETTISSUE, EFFECT_DESC
- Toxicity classification: TOXICITY (e.g., "acute", "chronic")
- Study details: TESTTYPE, GUIDELINE, GLP_COMPL, REMARKS

Note: Multiple records may be returned if multiple TOX_IDs are provided or if
a single study has multiple endpoints measured.

<dictionary_descriptions>
<name>STUDY_CATEGORY</name>
<description>Indicates the reason for testing Human health, Exotoxicology, Animal health (target) or Animal health (non target)</description>
<name>TESTSUBSTANCE</name>
<description>Description of the test material used in the toxocological study</description>
<name>TESTTYPE_CODE</name>
<description>Transmission code for the type of toxicological test</description>
<name>SPECIES_ID</name>
<description>Internal unique identifier of organism/cell culture used in the toxicological study</description>
<name>SPECIES</name>
<description>Description of the organism/cell culture used in the toxicological study</description>
<name>SEX</name>
<description>Indicates the sex of tested animals</description>
<name>NUMBER_INDIVIDUALS</name>
<description>Number of organisms dosed at each dose level of the toxicological study</description>
<name>CONTROL</name>
<description>Indicates whether and what type of concurrent control groups were used</description>
<name>EFFECT_DESC</name>
<description>Description of the effects observed in the toxicological study</description>
<name>REMARKS</name>
<description>Additional remarks on toxicological study. Free text on hazard assessment including (if necessary): 1) short explanation on how the study has been carried on; 2) any conclusions on the hazard identication (for example, explanation on why an hazard could not be identified)</description>
</dictionary_descriptions>

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tox_idYes

Implementation Reference

  • The main handler function for the 'get_toxicity_endpoints' tool. It queries the 'endpoint_study' table using a helper function and returns the results as JSON.
    def get_toxicity_endpoints(tox_id: Union[int, list[int]]):
        """
        Get toxicity endpoint study data from ENDPOINT_STUDY table by TOX_ID.
    
        Retrieves detailed toxicity endpoint records including NOAEL, LD50, and other
        toxicity measurements from animal and in vitro studies. This tool provides the
        experimental data used to assess the toxicological effects of food substances.
    
        Args:
            tox_id: Single TOX_ID (int) or list of TOX_IDs (list[int]) to query.
                   Use search_substance tool first to find TOX_IDs through the STUDY table.
    
        Returns:
            JSON string containing a DataFrame with toxicity endpoint records. Each record
            includes endpoint type, toxicity values, study conditions, and target organs.
    
        The returned data includes:
        - Endpoint information: ENDPOINT, ENDPOINT_CODE (e.g., NOAEL, LD50, LOAEL)
        - Toxicity values: VALUE, VALUE_MILLI, DOSEUNIT, DOSEUNITFULLTEXT
        - Qualifier: QUALIFIER (e.g., "greater than", "less than")
        - Study conditions: SPECIES, STRAIN, SEX, ROUTE, EXP_DURATION, DURATIONUNIT
        - Target information: TARGETTISSUE, EFFECT_DESC
        - Toxicity classification: TOXICITY (e.g., "acute", "chronic")
        - Study details: TESTTYPE, GUIDELINE, GLP_COMPL, REMARKS
    
        Note: Multiple records may be returned if multiple TOX_IDs are provided or if
        a single study has multiple endpoints measured.
    
        <dictionary_descriptions>
        <name>STUDY_CATEGORY</name>
        <description>Indicates the reason for testing Human health, Exotoxicology, Animal health (target) or Animal health (non target)</description>
        <name>TESTSUBSTANCE</name>
        <description>Description of the test material used in the toxocological study</description>
        <name>TESTTYPE_CODE</name>
        <description>Transmission code for the type of toxicological test</description>
        <name>SPECIES_ID</name>
        <description>Internal unique identifier of organism/cell culture used in the toxicological study</description>
        <name>SPECIES</name>
        <description>Description of the organism/cell culture used in the toxicological study</description>
        <name>SEX</name>
        <description>Indicates the sex of tested animals</description>
        <name>NUMBER_INDIVIDUALS</name>
        <description>Number of organisms dosed at each dose level of the toxicological study</description>
        <name>CONTROL</name>
        <description>Indicates whether and what type of concurrent control groups were used</description>
        <name>EFFECT_DESC</name>
        <description>Description of the effects observed in the toxicological study</description>
        <name>REMARKS</name>
        <description>Additional remarks on toxicological study. Free text on hazard assessment including (if necessary): 1) short explanation on how the study has been carried on; 2) any conclusions on the hazard identication (for example, explanation on why an hazard could not be identified)</description>
        </dictionary_descriptions>
        """
        df = query_by_id(tox_id, "endpoint_study")
        return df.to_json()
  • main.py:4-26 (registration)
    The tool is imported and registered with the MCP server using mcp.add_tool in the main server file.
    from src.mcp_openfoodtox.tools.get_toxicity_endpoints import get_toxicity_endpoints
    from src.mcp_openfoodtox.tools.get_genotox_details import get_genotox_details
    from src.mcp_openfoodtox.tools.get_opinions import get_opinions
    from src.mcp_openfoodtox.tools.substance_safety_assessment import get_substance_safety_assessment
    from src.mcp_openfoodtox.tools.list_substances_by_class_and_safety import (
        list_substances_by_class_and_safety,
    )
    from src.mcp_openfoodtox.tools.list_hazard_ids_by_assessment import list_hazard_ids_by_assessment
    from src.mcp_openfoodtox.tools.list_substances_by_assessment import list_substances_by_assessment
    
    # Initialize FastMCP server
    mcp = FastMCP("mcp-openfoodtox")
    
    # Add tools to the server
    mcp.add_tool(search_substance)
    mcp.add_tool(get_risk_assessments)
    mcp.add_tool(get_toxicity_endpoints)
    mcp.add_tool(get_genotox_details)
    mcp.add_tool(get_opinions)
    mcp.add_tool(get_substance_safety_assessment)
    mcp.add_tool(list_substances_by_class_and_safety)
    mcp.add_tool(list_hazard_ids_by_assessment)
    mcp.add_tool(list_substances_by_assessment)
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by disclosing key behavioral traits: it describes the return format ('JSON string containing a DataFrame'), explains that multiple records may be returned for multiple TOX_IDs or multiple endpoints, and provides extensive details about what data fields are included. It doesn't mention rate limits, authentication needs, or error handling, but covers the core behavior comprehensively.

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

Conciseness3/5

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

The description is appropriately front-loaded with purpose and usage, but becomes verbose with the extensive field listing and dictionary descriptions section. While informative, the dictionary descriptions could be streamlined or moved elsewhere as they add bulk without being essential for tool selection. The core description earns its place, but the appendix-like section reduces conciseness.

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

Completeness5/5

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

Given the complexity (toxicity data retrieval), no annotations, no output schema, and 0% schema coverage, the description is remarkably complete. It covers purpose, usage, parameters, return format, data structure, and even includes field definitions. For a tool with no structured metadata support, this provides all necessary context for an agent to understand and use the tool effectively.

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?

With 0% schema description coverage for the single parameter, the description fully compensates by providing rich semantic information: it explains that 'tox_id' can be 'Single TOX_ID (int) or list of TOX_IDs (list[int]) to query' and clarifies that TOX_IDs come from the STUDY table via the search_substance tool. This adds significant meaning beyond the bare schema.

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 toxicity endpoint study data from ENDPOINT_STUDY table by TOX_ID' with specific details about retrieving 'detailed toxicity endpoint records including NOAEL, LD50, and other toxicity measurements from animal and in vitro studies.' It distinguishes from siblings by focusing on endpoint data rather than genotoxicity details, opinions, risk assessments, or substance searches.

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 context for when to use this tool: 'Use search_substance tool first to find TOX_IDs through the STUDY table.' This explicitly names an alternative tool for prerequisite steps. However, it doesn't explicitly state when NOT to use this tool or compare it to other siblings like get_genotox_details or get_risk_assessments.

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