Skip to main content
Glama
clarkemn

cortex-cloud-docs-mcp-server

by clarkemn

get_index_status

Check how many documents are cached in the Cortex Cloud documentation index to monitor data availability.

Instructions

Check how many documents are currently cached.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the 'get_index_status' tool. It is decorated with @mcp.tool() which registers it with the MCP server. Returns JSON with cache statistics: total cached pages, expired pages, search cache entries, and breakdown by site.
    @mcp.tool()
    async def get_index_status() -> str:
        """Check how many documents are currently cached."""
        total_docs = len(indexer.cached_pages)
        sites = {}
        for page in indexer.cached_pages.values():
            site = page.site
            sites[site] = sites.get(site, 0) + 1
        
        # Also show cache statistics
        expired_count = sum(1 for page in indexer.cached_pages.values() if page.is_expired)
        
        return json.dumps({
            'total_cached_pages': total_docs,
            'expired_pages': expired_count,
            'search_cache_entries': len(indexer.search_cache),
            'by_site': sites
        }, indent=2)
  • The handler function for the 'get_index_status' tool. It is decorated with @mcp.tool() which registers it with the MCP server. Returns JSON with cache statistics: total cached pages, expired pages, search cache entries, and breakdown by site.
    @mcp.tool()
    async def get_index_status() -> str:
        """Check how many documents are currently cached."""
        total_docs = len(indexer.cached_pages)
        sites = {}
        for page in indexer.cached_pages.values():
            site = page.site
            sites[site] = sites.get(site, 0) + 1
        
        # Also show cache statistics
        expired_count = sum(1 for page in indexer.cached_pages.values() if page.is_expired)
        
        return json.dumps({
            'total_cached_pages': total_docs,
            'expired_pages': expired_count,
            'search_cache_entries': len(indexer.search_cache),
            'by_site': sites
        }, indent=2)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
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. It discloses the tool checks cache status, which implies a read-only, non-destructive operation, but doesn't add details like rate limits, auth needs, or what 'cached' entails. It's adequate but lacks rich behavioral context.

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 a single, efficient sentence that directly states the tool's purpose with zero waste. It's appropriately sized and front-loaded, making it easy to understand quickly.

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 has 0 parameters, 100% schema coverage, and an output schema exists, the description is reasonably complete. It covers the core purpose, but for a tool with no annotations, it could add more context on behavior or output, though the output schema mitigates this.

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 schema description coverage is 100%, so no parameter documentation is needed. The description doesn't add param info, which is fine here, but since there are no params, it doesn't fully compensate for any gaps, so it scores just below the maximum.

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 action ('Check') and resource ('documents currently cached'), providing a specific purpose. However, it doesn't differentiate from sibling tools like 'search_all_docs' or 'index_prisma_docs', which might also relate to document status or indexing operations, so it doesn't reach the highest 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 offers no guidance on when to use this tool versus alternatives like 'search_all_docs' or 'index_prisma_docs', nor does it mention prerequisites or exclusions. It implies usage for checking cache status but lacks explicit context or comparisons.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.