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, enabling safe file analysis and sharing.

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
file_pathYes
is_publicNo
entrypointNo
passwordNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'scan_file_cdr' tool. It is decorated with @app.tool for registration in FastMCP and implements the logic to upload a file to the ThreatZone API's CDR endpoint for content disarm and reconstruction processing.
    @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()
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states the action ('Submit for CDR processing') but lacks critical details: whether this is a destructive operation (CDR typically modifies files), authentication requirements, rate limits, expected processing time, or what happens to the original file. The description only covers basic parameter usage without behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and appropriately sized. The first sentence states the purpose clearly, followed by a bulleted list of parameter explanations. Each sentence earns its place by adding value. It could be slightly more concise by integrating parameter explanations into the main description, but the current structure is effective.

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 complexity (file processing with 4 parameters), no annotations, and the presence of an output schema, the description is moderately complete. It explains what the tool does and all parameters, but lacks behavioral context and usage guidance. The output schema existence means the description doesn't need to explain return values, but it should address the mutation nature of CDR processing.

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 provides clear semantic explanations for all 4 parameters beyond the schema's 0% coverage. It explains what each parameter means: '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)'. This fully compensates for the lack of schema descriptions, though it doesn't provide format examples or constraints.

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: 'Submit a file for CDR (Content Disarm and Reconstruction) processing.' This specifies the verb ('Submit'), resource ('file'), and processing type ('CDR'), making it distinct from sibling tools like scan_file_sandbox or scan_file_static. However, it doesn't explicitly differentiate from all siblings beyond naming the specific processing type.

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. It doesn't mention when CDR processing is appropriate compared to sandbox or static scanning, nor does it specify prerequisites or exclusions. The agent must infer usage from the tool name alone.

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

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