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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

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()
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 states the action ('submit a file for static analysis') but does not describe what static analysis entails, expected outcomes, permissions required, rate limits, or error handling. This leaves significant gaps for a tool that likely involves file processing and result visibility settings.

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 front-loaded with the core purpose in the first sentence, followed by a structured list of parameters. Each sentence earns its place by introducing the tool and explaining parameters, though the parameter explanations are brief and could be more informative. Overall, it is appropriately sized and well-structured.

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 complexity of file analysis, 0% schema coverage, no annotations, but an output schema present, the description is moderately complete. It covers the basic action and parameters but lacks behavioral context, usage guidelines, and detailed parameter semantics. The output schema may handle return values, but the description does not fully compensate for other gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It lists all four parameters with brief explanations (e.g., 'Path to the file to analyze'), adding basic semantics beyond the schema's titles. However, it lacks details on formats, constraints, or interactions between parameters, providing only minimal context for the undocumented schema.

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 static analysis.' It specifies the verb ('submit') and resource ('file'), but does not differentiate from sibling tools like 'scan_file_cdr' or 'scan_file_sandbox', which likely perform different types of analysis. The purpose is clear but lacks sibling differentiation.

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 does not mention sibling tools like 'scan_file_sandbox' or 'scan_url', nor does it specify contexts or exclusions for static analysis. Usage is implied only by the tool name and description, with no explicit guidelines.

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