Skip to main content
Glama
gemini2026

Documentation Search MCP Server

by gemini2026

health_check

Verify documentation source availability and health status for programming libraries and frameworks.

Instructions

Check the health and availability of documentation sources.

Returns:
    Dictionary with health status of each library's documentation site

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Implementation of the 'health_check' MCP tool. This async function performs HEAD requests to sample documentation URLs, measures response times, checks for timeouts/errors, and includes cache statistics if enabled. Registered via @mcp.tool() decorator.
    async def health_check():
        """
        Check the health and availability of documentation sources.
    
        Returns:
            Dictionary with health status of each library's documentation site
        """
        results = {}
    
        # Test a sample of libraries to avoid overwhelming servers
        sample_libraries = list(docs_urls.items())[:5]
    
        for library, url in sample_libraries:
            start_time = time.time()
            try:
                async with httpx.AsyncClient() as client:
                    response = await client.head(
                        str(url),
                        timeout=httpx.Timeout(10.0),
                        headers={"User-Agent": USER_AGENT},
                        follow_redirects=True,
                    )
                    response_time = time.time() - start_time
                    results[library] = {
                        "status": "healthy",
                        "status_code": response.status_code,
                        "response_time_ms": round(response_time * 1000, 2),
                        "url": url,
                    }
            except httpx.TimeoutException:
                results[library] = {
                    "status": "timeout",
                    "error": "Request timed out",
                    "url": url,
                }
            except Exception as e:
                results[library] = {"status": "error", "error": str(e), "url": url}
    
        # Add cache stats if caching is enabled
        if cache:
            cache_stats = await cache.stats()
            results["_cache_stats"] = {"enabled": True, **cache_stats}
        else:
            results["_cache_stats"] = {"enabled": False}
    
        return results
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool returns a dictionary with health statuses, which is helpful, but lacks details about what 'health' entails (e.g., uptime, response codes), whether it performs network calls, potential rate limits, or error handling. This leaves significant gaps for a tool that likely involves external system checks.

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 brief and front-loaded, with the core purpose stated first and return value clarified in a separate line. It avoids unnecessary details, though the formatting with 'Returns:' could be slightly more integrated for optimal flow.

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

Completeness3/5

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

Given the tool's complexity (likely involving external checks) and lack of annotations or output schema, the description is minimally adequate. It explains what the tool does and the return format, but doesn't cover behavioral aspects like network dependencies or error cases, which are important for a health-check operation.

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 tool has 0 parameters, and the input schema has 100% description coverage (though empty). The description doesn't need to add parameter semantics, so it meets the baseline of 4 for tools with no parameters, as there's nothing to compensate for.

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 with a specific verb ('Check') and resource ('health and availability of documentation sources'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_docs' or 'semantic_search' that might also interact with documentation sources, which prevents a perfect score.

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. With siblings like 'get_docs' (likely for retrieving documentation content) and 'semantic_search' (for searching documentation), there's no indication of when health checking is appropriate versus content retrieval or search operations.

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/gemini2026/documentation-search-mcp'

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