Skip to main content
Glama

check_documentation_health

Read-only

Test connectivity and status of Ilograph's documentation fetching service, including cache statistics and health reports.

Instructions

    Checks the health and connectivity of the documentation fetching service.

    This tool performs connectivity tests and returns status information about
    the documentation fetching capabilities, including cache statistics.

    Returns:
        str: Health status report with service connectivity and cache information
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'check_documentation_health' tool. It uses @mcp.tool decorator for registration and implements the logic to check the health of the documentation service, including service connectivity and cache status, returning a formatted Markdown report.
        annotations={
            "title": "Check Documentation Service Health",
            "readOnlyHint": True,
            "description": "Checks the health and connectivity of the documentation fetching service",
        }
    )
    async def check_documentation_health(ctx: Context) -> str:
        """
        Checks the health and connectivity of the documentation fetching service.
    
        This tool performs connectivity tests and returns status information about
        the documentation fetching capabilities, including cache statistics.
    
        Returns:
            str: Health status report with service connectivity and cache information
        """
        try:
            await ctx.info("Performing documentation service health check")
    
            fetcher = get_fetcher()
            health_info = await fetcher.health_check()
    
            # Format health report
            health_md = "# Documentation Service Health Report\n\n"
            health_md += f"**Overall Status:** {health_info['status'].upper()}\n\n"
    
            # Service status
            health_md += "## Service Connectivity\n\n"
            for service, info in health_info["services"].items():
                status_emoji = "✅" if info["status"] == "healthy" else "❌"
                health_md += f"{status_emoji} **{service.title()}**: {info['status'].upper()}\n"
                health_md += f"   - URL: {info['url']}\n"
                if "error" in info:
                    health_md += f"   - Error: {info['error']}\n"
                health_md += "\n"
    
            # Cache statistics
            cache_stats = health_info["cache_stats"]
            health_md += "## Cache Statistics\n\n"
            health_md += f"- **Total Entries:** {cache_stats['total_entries']}\n"
            health_md += f"- **Valid Entries:** {cache_stats['valid_entries']}\n"
            health_md += f"- **Expired Entries:** {cache_stats['expired_entries']}\n"
    
            if cache_stats["keys"]:
                health_md += f"- **Cached Keys:** {', '.join(cache_stats['keys'])}\n"
    
            health_md += "\n---\n\n"
    
            if health_info["status"] == "healthy":
                health_md += "*All services are operational and ready to fetch documentation.*"
            elif health_info["status"] == "degraded":
                unhealthy = health_info.get("unhealthy_services", [])
                health_md += f"*Some services are experiencing issues: {', '.join(unhealthy)}. Documentation fetching may be limited.*"
    
            await ctx.info(f"Health check completed - Status: {health_info['status']}")
            return health_md
    
        except Exception as e:
            error_msg = f"Error performing health check: {str(e)}"
            await ctx.error(error_msg)
            return f"Error: {error_msg}"
  • Top-level registration call in the server setup that invokes the function to register the documentation tools, including 'check_documentation_health'.
    register_fetch_documentation_tool(mcp)
  • Re-export of the register function in the tools package init for easier imports.
    from .register_fetch_documentation_tools import get_tool_info, register_fetch_documentation_tool
  • Helper function that provides metadata about the documentation tools, listing 'check_documentation_health' among them.
    def get_tool_info() -> dict:
        """Get information about the documentation tools for registration."""
        return {
            "name": "fetch_documentation_tool",
            "description": "Fetches comprehensive Ilograph documentation with markdown formatting",
            "tools": [
                "fetch_documentation_tool",
                "list_documentation_sections",
                "check_documentation_health",
            ],
        }
Behavior4/5

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

Annotations provide readOnlyHint=true, indicating a safe read operation. The description adds valuable behavioral context beyond annotations by specifying what the tool does (connectivity tests, returns status with cache statistics) and the return format (health status report as a string), enhancing transparency without contradicting annotations.

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 appropriately sized and front-loaded, with the first sentence stating the core purpose and subsequent sentences adding necessary details about tests and returns. Every sentence earns its place without redundancy or waste, making it highly efficient.

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 low complexity (0 parameters, read-only), annotations cover safety, and the description explains behavior and output format. However, without an output schema, the description could be more detailed about the report structure, though it adequately covers the context for a health-check tool.

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?

With 0 parameters and 100% schema description coverage, the schema fully documents the lack of inputs. The description adds no parameter information, which is appropriate here, but does not compensate for any gaps since none exist. Baseline is 4 for zero parameters, as no additional semantics are needed.

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 with specific verbs ('checks health and connectivity') and resources ('documentation fetching service'), distinguishing it from siblings like fetch_documentation_tool or check_spec_health by focusing on service health rather than content retrieval or specification checks.

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

Usage Guidelines3/5

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

The description implies usage for health monitoring but does not explicitly state when to use this tool versus alternatives like check_spec_health or when not to use it. No prerequisites or exclusions are mentioned, leaving usage context inferred rather than clearly defined.

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/QuincyMillerDev/ilograph-mcp-server'

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