Skip to main content
Glama
zachegner

EPA Envirofacts MCP Server

by zachegner

health_check

Verify system health and EPA API connectivity to ensure reliable access to environmental data for analysis.

Instructions

System health and API connectivity check.

Returns: Health status information including EPA API connectivity

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • server.py:54-83 (handler)
    The MCP tool handler for 'health_check', decorated with @mcp.tool() for automatic registration. It checks server and EPA API health by calling FRSClient.health_check().
    @mcp.tool()
    async def health_check() -> Dict[str, Any]:
        """System health and API connectivity check.
        
        Returns:
            Health status information including EPA API connectivity
        """
        try:
            from src.client import FRSClient
            
            # Test EPA API connectivity
            async with FRSClient() as client:
                health_status = await client.health_check()
            
            return {
                "status": "healthy",
                "version": "1.0.0",
                "server_name": "epa-envirofacts",
                "epa_api": health_status,
                "timestamp": structlog.get_logger().info("Health check completed")
            }
            
        except Exception as e:
            return {
                "status": "unhealthy",
                "version": "1.0.0", 
                "server_name": "epa-envirofacts",
                "error": str(e),
                "timestamp": structlog.get_logger().error(f"Health check failed: {e}")
            }
  • Helper method in BaseEPAClient (FRSClient base) that performs the actual EPA API health check via a test query, used by the tool handler.
    async def health_check(self) -> Dict[str, Any]:
        """Check EPA API connectivity.
        
        Returns:
            Health status information
        """
        try:
            # Simple test query to FRS facility_site table
            test_url = self._build_query_url('frs.frs_facility_site', limit=1)
            await self._execute_query(test_url)
            
            return {
                "status": "healthy",
                "api_reachable": True,
                "base_url": self.base_url,
                "timeout": self.timeout
            }
            
        except Exception as e:
            logger.error(f"EPA API health check failed: {e}")
            return {
                "status": "unhealthy",
                "api_reachable": False,
                "error": str(e),
                "base_url": self.base_url,
                "timeout": self.timeout
            }
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 mentions the tool returns 'Health status information including EPA API connectivity,' which implies a read-only, non-destructive operation. However, it lacks details on response format, error handling, rate limits, or authentication needs—leaving behavioral gaps 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.

Conciseness4/5

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

The description is front-loaded with the core purpose in the first sentence and follows with output details. It's efficient with two sentences and minimal waste, though the second sentence could be integrated more smoothly (e.g., 'Returns health status information, including EPA API connectivity').

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 simplicity (0 parameters, no annotations, but an output schema exists), the description is reasonably complete. It explains what the tool does and what it returns, and since an output schema is present, it needn't detail return values. However, it could better address behavioral aspects like error cases or typical use contexts.

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

Parameters4/5

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

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately avoids discussing parameters, focusing instead on the tool's purpose and output. This meets the baseline for tools with no parameters, as it doesn't add unnecessary details.

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 as a 'System health and API connectivity check' with specific verbs ('check') and resources ('System health', 'EPA API connectivity'). It distinguishes itself from sibling tools focused on environmental data retrieval, but doesn't explicitly contrast with hypothetical alternative health-check tools.

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. While it's implicitly for monitoring system/API status, there's no explicit context about prerequisites, timing (e.g., during troubleshooting), or comparisons to other diagnostic tools. It merely states what it does without usage instructions.

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/zachegner/envirofacts-mcp'

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