Skip to main content
Glama
gemini2026

Documentation Search MCP Server

by gemini2026

get_security_summary

Obtain a concise security overview for software libraries, providing risk scores and basic recommendations to assess package safety before integration.

Instructions

Get quick security overview for a library without detailed vulnerability list.

Args:
    library_name: Name of the library
    ecosystem: Package ecosystem (default: PyPI)

Returns:
    Concise security summary with score and basic recommendations

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
library_nameYes
ecosystemNoPyPI

Implementation Reference

  • MCP tool handler for 'get_security_summary'. Registers the tool using @mcp.tool() decorator and implements the core logic by calling the underlying security_integration.get_security_summary() helper.
    @mcp.tool()
    async def get_security_summary(library_name: str, ecosystem: str = "PyPI"):
        """
        Get quick security overview for a library without detailed vulnerability list.
    
        Args:
            library_name: Name of the library
            ecosystem: Package ecosystem (default: PyPI)
    
        Returns:
            Concise security summary with score and basic recommendations
        """
        await enforce_rate_limit("get_security_summary")
    
        from .vulnerability_scanner import security_integration
    
        try:
            summary = await security_integration.get_security_summary(
                library_name, ecosystem
            )
    
            # Add security badge
            score = summary.get("security_score", 50)
            if score >= 90:
                badge = "🛡️ EXCELLENT"
            elif score >= 70:
                badge = "✅ SECURE"
            elif score >= 50:
                badge = "⚠️ CAUTION"
            else:
                badge = "🚨 HIGH RISK"
    
            return {
                "library": library_name,
                "ecosystem": ecosystem,
                "security_badge": badge,
                "security_score": score,
                "status": summary.get("status", "unknown"),
                "vulnerabilities": {
                    "total": summary.get("total_vulnerabilities", 0),
                    "critical": summary.get("critical_vulnerabilities", 0),
                },
                "recommendation": summary.get(
                    "primary_recommendation", "No recommendations available"
                ),
                "last_scanned": datetime.now().isoformat(),
            }
    
        except Exception as e:
            return {
                "library": library_name,
                "ecosystem": ecosystem,
                "security_badge": "❓ UNKNOWN",
                "security_score": None,
                "status": "scan_failed",
                "error": str(e),
            }
  • Core helper function in SecurityIntegration class that performs the security scan using VulnerabilityScanner.scan_library() and formats a concise summary dictionary. This is called by the MCP tool handler.
    async def get_security_summary(
        self, library_name: str, ecosystem: str = "PyPI"
    ) -> Dict[str, Any]:
        """Get concise security summary"""
        try:
            report = await self.scanner.scan_library(library_name, ecosystem)
            return {
                "library": library_name,
                "security_score": report.security_score,
                "total_vulnerabilities": report.total_vulnerabilities,
                "critical_vulnerabilities": report.critical_count,
                "status": "secure" if report.security_score >= 70 else "at_risk",
                "primary_recommendation": (
                    report.recommendations[0]
                    if report.recommendations
                    else "No specific recommendations"
                ),
            }
        except Exception as e:
            return {
                "library": library_name,
                "security_score": 50.0,
                "error": str(e),
                "status": "unknown",
            }
  • The @mcp.tool() decorator registers the get_security_summary function as an MCP tool.
    @mcp.tool()
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. It mentions the tool returns a 'concise security summary with score and basic recommendations,' which gives some insight into output behavior. However, it doesn't address critical aspects like whether this is a read-only operation, potential rate limits, authentication requirements, or error handling. The description adds minimal behavioral context beyond the basic purpose.

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 well-structured and front-loaded with the core purpose in the first sentence. The 'Args' and 'Returns' sections are clearly labeled and provide necessary details without redundancy. Every sentence earns its place, making it efficient and easy to parse.

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 the tool's moderate complexity (2 parameters, no annotations, no output schema), the description is partially complete. It covers the purpose, parameters, and return format adequately. However, it lacks details on behavioral aspects like error conditions, performance, or integration with sibling tools. Without annotations or output schema, more context on what the 'security summary' contains would be beneficial.

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 description includes an 'Args' section that documents both parameters: 'library_name' and 'ecosystem' with a default value. With 0% schema description coverage, this documentation is essential. It adds clear meaning beyond the bare schema, explaining what each parameter represents and providing a default for 'ecosystem.' However, it doesn't specify allowed values for 'ecosystem' beyond the default example.

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 tool's purpose: 'Get quick security overview for a library without detailed vulnerability list.' It specifies the verb ('Get'), resource ('security overview for a library'), and scope ('without detailed vulnerability list'). However, it doesn't explicitly differentiate from sibling tools like 'scan_library_vulnerabilities' or 'snyk_scan_library', which likely provide more detailed vulnerability information.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context by stating 'without detailed vulnerability list,' suggesting this tool is for a high-level overview rather than in-depth analysis. However, it doesn't provide explicit guidance on when to use this tool versus alternatives like 'scan_library_vulnerabilities' or 'snyk_scan_library,' nor does it mention any prerequisites or exclusions.

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/gemini2026/documentation-search-mcp'

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