get_index_status
Check the number of cached documents in the Prisma Cloud documentation index to monitor indexing status and verify document availability.
Instructions
Check how many documents are currently cached.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/main.py:225-242 (handler)Implementation of the get_index_status tool handler. This function is registered as an MCP tool via @mcp.tool() decorator and provides status of the documentation index cache, including total pages, expired pages, 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)
- server.py:221-238 (handler)Duplicate implementation of the get_index_status tool handler. Identical to the one in src/main.py, registered via @mcp.tool() decorator.@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)