Skip to main content
Glama
threat-zone

Threat.Zone MCP Server

by threat-zone

scan_file_cdr

Submit files for Content Disarm and Reconstruction to remove potentially malicious content while preserving functionality, supporting archives with password protection and entry point specification.

Instructions

Submit a file for CDR (Content Disarm and Reconstruction) processing.

Args: file_path: Path to the file to process 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
entrypointNo
file_pathYes
is_publicNo
passwordNo

Implementation Reference

  • The handler function for the 'scan_file_cdr' MCP tool. It checks if the file exists, prepares form data with optional parameters, and posts the file to the ThreatZone API endpoint '/public-api/scan/cdr' for CDR processing. The @app.tool decorator registers this function as an MCP tool.
    @app.tool async def scan_file_cdr( file_path: str, is_public: bool = False, entrypoint: Optional[str] = None, password: Optional[str] = None ) -> Dict[str, Any]: """ Submit a file for CDR (Content Disarm and Reconstruction) processing. Args: file_path: Path to the file to process 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/cdr", data=data, files=files) finally: files["file"].close()
  • The @app.tool decorator from FastMCP registers the scan_file_cdr function as an MCP tool.
    @app.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/threat-zone/threatzonemcp'

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