Skip to main content
Glama
clarkemn

prisma-cloud-docs-mcp-server

search_all_docs

Search across all Prisma Cloud documentation sites to find answers to your questions about the platform.

Instructions

Search across all Prisma Cloud documentation sites.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the 'search_all_docs' MCP tool. It is decorated with @mcp.tool() for registration and executes the core logic by delegating to the indexer's search_docs method, serializing results to JSON.
    @mcp.tool()
    async def search_all_docs(query: str) -> str:
        """Search across all Prisma Cloud documentation sites."""
        results = await indexer.search_docs(query)
        return json.dumps(results, indent=2)
  • Identical handler function for the 'search_all_docs' MCP tool in server.py variant.
    @mcp.tool()
    async def search_all_docs(query: str) -> str:
        """Search across all Prisma Cloud documentation sites."""
        results = await indexer.search_docs(query)
        return json.dumps(results, indent=2)
  • Core search logic in DocumentationIndexer.search_docs method, called by the tool handler. Performs relevance scoring on cached pages and returns top 10 results.
    async def search_docs(self, query: str, site: str = None) -> List[Dict]:
        """Search indexed documentation"""
        if not self.cached_pages:
            return []
        
        query_lower = query.lower()
        results = []
        
        for url, page in self.cached_pages.items():
            # Filter by site if specified
            if site and page.site != site:
                continue
            
            # Calculate relevance score
            score = 0
            title_lower = page.title.lower()
            content_lower = page.content.lower()
            
            # Higher score for title matches
            if query_lower in title_lower:
                score += 10
                # Even higher for exact title matches
                if query_lower == title_lower:
                    score += 20
            
            # Score for content matches
            content_matches = content_lower.count(query_lower)
            score += content_matches * 2
            
            # Score for partial word matches in title
            query_words = query_lower.split()
            for word in query_words:
                if word in title_lower:
                    score += 5
                if word in content_lower:
                    score += 1
            
            if score > 0:
                # Extract snippet around first match
                snippet = self._extract_snippet(page.content, query, max_length=200)
                
                results.append({
                    'title': page.title,
                    'url': page.url,
                    'site': page.site,
                    'snippet': snippet,
                    'score': score
                })
        
        # Sort by relevance score (highest first) and limit results
        results.sort(key=lambda x: x['score'], reverse=True)
        return results[:10]
  • Core search logic in DocumentationIndexer.search_docs method (identical to src/main.py).
    async def search_docs(self, query: str, site: str = None) -> List[Dict]:
        """Search indexed documentation"""
        if not self.cached_pages:
            return []
        
        query_lower = query.lower()
        results = []
        
        for url, page in self.cached_pages.items():
            # Filter by site if specified
            if site and page.site != site:
                continue
            
            # Calculate relevance score
            score = 0
            title_lower = page.title.lower()
            content_lower = page.content.lower()
            
            # Higher score for title matches
            if query_lower in title_lower:
                score += 10
                # Even higher for exact title matches
                if query_lower == title_lower:
                    score += 20
            
            # Score for content matches
            content_matches = content_lower.count(query_lower)
            score += content_matches * 2
            
            # Score for partial word matches in title
            query_words = query_lower.split()
            for word in query_words:
                if word in title_lower:
                    score += 5
                if word in content_lower:
                    score += 1
            
            if score > 0:
                # Extract snippet around first match
                snippet = self._extract_snippet(page.content, query, max_length=200)
                
                results.append({
                    'title': page.title,
                    'url': page.url,
                    'site': page.site,
                    'snippet': snippet,
                    'score': score
                })
        
        # Sort by relevance score (highest first) and limit results
        results.sort(key=lambda x: x['score'], reverse=True)
        return results[:10]
  • The DocumentationIndexer class initialization, defining caches and base URLs used by the search functionality.
    class DocumentationIndexer:
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. The description only states what the tool does at a high level ('Search across all Prisma Cloud documentation sites') but doesn't disclose any behavioral traits such as search scope limitations, performance characteristics, authentication requirements, rate limits, or what the output contains. This leaves significant gaps for an agent trying to understand how to use this tool effectively.

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 extremely concise - a single sentence that directly states the tool's purpose. There's no wasted language or unnecessary elaboration, making it front-loaded and efficient. Every word earns its place in conveying the core functionality.

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 that there's an output schema (which means the description doesn't need to explain return values), the description provides the minimum viable information about what the tool does. However, for a search tool with no annotations and 0% schema description coverage, the description should do more to explain search behavior, scope, and limitations to be truly complete for agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage, with only a single parameter 'query' documented as a string. The description provides no additional information about parameter semantics - it doesn't explain what type of search query is expected, syntax requirements, or any constraints. With low schema coverage, the description fails to compensate for the lack of parameter documentation.

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 ('Search') and the resource ('across all Prisma Cloud documentation sites'), which provides a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'search_prisma_api_docs' or 'search_prisma_docs', which appear to be more targeted searches.

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 sibling tools like 'search_prisma_api_docs' and 'search_prisma_docs' available, there's no indication of what makes this tool different or when it should be preferred over those more specific options.

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/clarkemn/prisma-cloud-docs-mcp-server'

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