Skip to main content
Glama
joesecurity

JoeSandboxMCP

Official
by joesecurity

get_dropped_files

Download and extract all dropped files from a Joe Sandbox malware analysis for local inspection. Specify the analysis ID to retrieve files from the analysis run.

Instructions

Download all dropped files from a Joe Sandbox analysis.

This tool retrieves the 'dropped' archive from the specified analysis run and extracts
all contents into a local directory for further inspection.

Files are extracted as-is without renaming or classification.

Output path logic:
- If `save_path` is valid, dumps go to `{save_path}/droppedfiles/{webid}`
- If not, fallback is `droppedfiles/{webid}` under the current directory

Args:
    webid (str): Joe Sandbox analysis ID
    run (int, optional): Run index (default: 0)
    save_path (str, optional): Optional base path to save dumps

Returns:
    dict: {
        "output_directory": absolute path to extraction folder,
        "files": list of files with full path
        "note": status message (e.g. fallback notice)
    }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
webidYes
runNo
save_pathNo

Implementation Reference

  • The primary MCP tool handler for 'get_dropped_files'. Decorated with @mcp.tool() for automatic registration. Wraps the core download_dropped_files function, adding error handling and documentation.
    @mcp.tool()
    async def get_dropped_files(webid: str, run: int = 0, save_path: Optional[str] = None) -> Dict[str, Any]:
        """
        Download all dropped files from a Joe Sandbox analysis.
    
        This tool retrieves the 'dropped' archive from the specified analysis run and extracts
        all contents into a local directory for further inspection.
    
        Files are extracted as-is without renaming or classification.
    
        Output path logic:
        - If `save_path` is valid, dumps go to `{save_path}/droppedfiles/{webid}`
        - If not, fallback is `droppedfiles/{webid}` under the current directory
    
        Args:
            webid (str): Joe Sandbox analysis ID
            run (int, optional): Run index (default: 0)
            save_path (str, optional): Optional base path to save dumps
    
        Returns:
            dict: {
                "output_directory": absolute path to extraction folder,
                "files": list of files with full path
                "note": status message (e.g. fallback notice)
            }
        """
        try:
            return await download_dropped_files(webid, run, save_path)
        except Exception as e:
            return {
                "error": f"Failed to download dropped files for submission ID '{webid}' run {run}. "
                         f"Reason: {str(e)}"
            }
  • The core helper function implementing the download and extraction logic. Downloads the 'bins' ZIP archive from Joe Sandbox API (password-protected with 'infected'), extracts files to a directory (with fallback path handling), and returns file paths.
    async def download_dropped_files(
        webid: str,
        run: Optional[int] = 0,
        save_path: Optional[str] = None
    ) -> Dict[str, Any]:
        jbx_client = get_client()
    
        _, data = jbx_client.analysis_download(webid=webid, run=run, type="bins")
    
        default_output_dir = os.path.join("droppedfiles", f"{webid}-{run}")
        output_dir = default_output_dir
        used_default_path = False
    
        if save_path:
            try:
                output_dir = os.path.join(save_path, "droppedfiles", f"{webid}-{run}")
                os.makedirs(output_dir, exist_ok=True)
            except (OSError, FileNotFoundError):
                output_dir = default_output_dir
                os.makedirs(output_dir, exist_ok=True)
                used_default_path = True
        else:
            os.makedirs(output_dir, exist_ok=True)
    
        extracted_files: list[str] = []
        with zipfile.ZipFile(io.BytesIO(data)) as zf:
            zf.extractall(path=output_dir, pwd=b"infected")
    
            for name in zf.namelist():
                if name.endswith("/"):
                    continue
                extracted_files.append(os.path.abspath(os.path.join(output_dir, name)))
    
        note = (
            "User-provided save_path was invalid. Default directory was used."
            if used_default_path
            else "Extraction completed successfully."
        )
    
        return {
            "output_directory": os.path.abspath(output_dir),
            "files": extracted_files,
            "note": note,
        }
  • jbxmcp/server.py:19-19 (registration)
    Import of tools module in server.py, which executes the @mcp.tool() decorators to register all tools including get_dropped_files with the FastMCP server.
    import jbxmcp.tools as tools
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by disclosing key behaviors: it downloads and extracts files 'as-is without renaming or classification', details output path logic with fallback rules, and describes the return structure. It doesn't mention permissions, rate limits, or error handling, but covers core operational traits adequately.

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 front-loaded with the core purpose, followed by behavioral details, output logic, and parameter/return explanations in a logical flow. Every sentence adds value—no fluff or repetition—making it efficiently structured and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 3 parameters, no annotations, and no output schema, the description is largely complete: it covers purpose, behavior, parameter meanings, and return format. It lacks details on error cases or authentication needs, but given the context, it provides sufficient guidance for effective use.

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?

Schema description coverage is 0%, so the description must compensate. It adds meaningful context for all three parameters: webid as 'Joe Sandbox analysis ID', run as 'Run index (default: 0)', and save_path as 'Optional base path to save dumps'. This clarifies purpose beyond schema titles, though it could detail format constraints (e.g., webid structure).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('download all dropped files'), the resource ('from a Joe Sandbox analysis'), and distinguishes it from siblings like get_dropped_info (which likely provides metadata) and get_unpacked_files (which handles different file types). The verb+resource combination is precise and unambiguous.

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

Usage Guidelines4/5

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

The description implies usage context by specifying 'for further inspection' and distinguishes from metadata tools like get_dropped_info through its focus on file extraction. However, it doesn't explicitly state when NOT to use it or name specific alternatives among siblings, missing full explicit guidance.

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/joesecurity/joesandboxMCP'

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