Skip to main content
Glama

prisma-cloud-docs-mcp-server

search_prisma_docs

Search the Prisma Cloud documentation to find relevant information by entering a query. Retrieve answers directly from the official Prisma Cloud docs for quick reference.

Instructions

Search Prisma Cloud documentation

Input Schema

NameRequiredDescriptionDefault
queryYes

Input Schema (JSON Schema)

{ "properties": { "query": { "title": "Query", "type": "string" } }, "required": [ "query" ], "title": "search_prisma_docsArguments", "type": "object" }

Implementation Reference

  • The handler function for the search_prisma_docs tool, registered via @mcp.tool() decorator. It invokes the DocumentationIndexer.search_docs method for Prisma Cloud site and returns JSON results.
    @mcp.tool() async def search_prisma_docs(query: str) -> str: """Search Prisma Cloud documentation""" results = await indexer.search_docs(query, site='prisma_cloud') return json.dumps(results, indent=2)
  • Duplicate handler function for the search_prisma_docs tool in server.py file.
    @mcp.tool() async def search_prisma_docs(query: str) -> str: """Search Prisma Cloud documentation""" results = await indexer.search_docs(query, site='prisma_cloud') return json.dumps(results, indent=2)
  • Core helper method in DocumentationIndexer class that performs relevance-based search across cached documentation pages, used by the search_prisma_docs handler.
    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]
  • src/main.py:195-195 (registration)
    MCP tool registration decorator for search_prisma_docs.
    @mcp.tool()
  • server.py:191-191 (registration)
    MCP tool registration decorator for search_prisma_docs in server.py.
    @mcp.tool()

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