Skip to main content
Glama
threat-zone

Threat.Zone MCP Server

by threat-zone

scan_file_static

Analyze files for security threats through static malware analysis to detect malicious code without execution, supporting archives with password protection and entrypoint specification.

Instructions

Submit a file for static analysis.

Args: file_path: Path to the file to analyze is_public: Whether the scan results should be public entrypoint: File to execute within archive (if applicable) password: Password for archive files (if applicable)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
is_publicNo
entrypointNo
passwordNo

Implementation Reference

  • Handler function for the 'scan_file_static' tool. Registers the tool via @app.tool decorator and implements static file scanning by uploading the file to the ThreatZone API endpoint /public-api/scan/static.
    @app.tool
    async def scan_file_static(
        file_path: str, 
        is_public: bool = False, 
        entrypoint: Optional[str] = None, 
        password: Optional[str] = None
    ) -> Dict[str, Any]:
        """
        Submit a file for static analysis.
        
        Args:
            file_path: Path to the file to analyze
            is_public: Whether the scan results should be public
            entrypoint: File to execute within archive (if applicable)
            password: Password for archive files (if applicable)
        """
        if not Path(file_path).exists():
            raise ThreatZoneError(f"File not found: {file_path}")
        
        data = {"isPublic": is_public}
        if entrypoint:
            data["entrypoint"] = entrypoint
        if password:
            data["password"] = password
        
        files = {"file": open(file_path, "rb")}
        try:
            return await get_client().post("/public-api/scan/static", data=data, files=files)
        finally:
            files["file"].close()

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/threat-zone/threatzonemcp'

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