Skip to main content
Glama

check_spec_health

Read-only

Tests connectivity and health of the specification fetching service, returning status reports on spec service availability and cache information.

Instructions

    Checks the health and connectivity of the specification fetching service.

    This tool performs connectivity tests specifically for the specification endpoint
    and returns status information about spec fetching capabilities.

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function for the 'check_spec_health' tool. Decorated with @mcp.tool(), it checks the specification service health using get_fetcher().health_check(), formats endpoint status, cache info, and returns a markdown health report.
        annotations={
            "title": "Check Specification Service Health",
            "readOnlyHint": True,
            "description": "Checks the health and connectivity of the specification fetching service",
        }
    )
    async def check_spec_health(ctx: Context) -> str:
        """
        Checks the health and connectivity of the specification fetching service.
    
        This tool performs connectivity tests specifically for the specification endpoint
        and returns status information about spec fetching capabilities.
    
        Returns:
            str: Health status report with spec service connectivity and cache information
        """
        try:
            await ctx.info("Performing specification service health check")
    
            fetcher = get_fetcher()
    
            # Get overall health info and extract spec-specific information
            health_info = await fetcher.health_check()
    
            # Extract specification service status
            spec_service = health_info["services"].get("specification", {})
            spec_status = spec_service.get("status", "unknown")
    
            # Format health report
            health_md = "# Specification Service Health Report\n\n"
            health_md += f"**Overall Status:** {spec_status.upper()}\n\n"
    
            # Specification endpoint status
            health_md += "## Specification Endpoint\n\n"
            status_emoji = "✅" if spec_status == "healthy" else "❌"
            health_md += f"{status_emoji} **Ilograph Spec Endpoint**: {spec_status.upper()}\n"
            health_md += (
                f"   - URL: {spec_service.get('url', 'https://www.ilograph.com/docs/spec/')}\n"
            )
    
            if "error" in spec_service:
                health_md += f"   - Error: {spec_service['error']}\n"
    
            # Cache information for spec
            cache_stats = health_info.get("cache_stats", {})
            cached_keys = cache_stats.get("keys", [])
            spec_cached = "specification" in cached_keys
    
            health_md += "\n## Specification Cache\n\n"
            health_md += f"- **Cached:** {'Yes' if spec_cached else 'No'}\n"
            health_md += (
                f"- **Total Cache Entries:** {cache_stats.get('total_entries', 'Unknown')}\n"
            )
            health_md += (
                f"- **Valid Cache Entries:** {cache_stats.get('valid_entries', 'Unknown')}\n"
            )
    
            health_md += "\n---\n\n"
    
            if spec_status == "healthy":
                health_md += (
                    "*Specification service is operational and ready to fetch the latest spec.*"
                )
            else:
                health_md += (
                    "*Specification service is experiencing issues. Spec fetching may be limited.*"
                )
    
            await ctx.info(f"Spec health check completed - Status: {spec_status}")
            return health_md
    
        except Exception as e:
            error_msg = f"Error performing spec health check: {str(e)}"
            await ctx.error(error_msg)
            return f"Error: {error_msg}"
  • Registers the fetch_spec_tool module (including check_spec_health) by calling register_fetch_spec_tool(mcp) in the create_server() function.
    register_fetch_spec_tool(mcp)
  • Imports the register_fetch_spec_tool function which defines and registers the check_spec_health tool.
    from ilograph_mcp.tools.register_fetch_spec_tool import register_fetch_spec_tool
Behavior4/5

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

Annotations already declare readOnlyHint=true, indicating a safe read operation. The description adds valuable behavioral context beyond annotations by specifying what gets tested ('connectivity tests specifically for the specification endpoint') and what information is returned ('status information about spec fetching capabilities', 'cache information').

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 perfectly structured with three focused sentences: purpose statement, specific behavior, and return value. Every sentence earns its place with no wasted words, and the information is front-loaded with the core purpose first.

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?

For a zero-parameter health check tool with readOnlyHint annotation, the description is quite complete. It explains what's being tested, what information is returned, and the tool's specific scope. The main gap is no output schema, but the description describes the return value format ('Health status report with spec service connectivity and cache information').

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 baseline would be 4. The description appropriately doesn't discuss parameters since there are none, and instead focuses on the tool's behavior and return value.

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', 'performs connectivity tests') and resources ('specification fetching service', 'specification endpoint'). It distinguishes from siblings by focusing on spec service health rather than documentation, examples, or validation.

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 ('checks the health and connectivity of the specification fetching service'), but doesn't explicitly state when not to use it or name specific alternatives. The sibling tools list shows related health/status tools, but the description doesn't contrast with them.

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