Skip to main content
Glama
joesecurity

JoeSandboxMCP

Official
by joesecurity

get_memory_dumps

Download and extract memory dumps from Joe Sandbox malware analysis for forensic investigation. Retrieves raw memory snapshots captured during execution and saves them to a local directory.

Instructions

Download and extract memory dumps from a Joe Sandbox analysis.

This tool retrieves the 'memdumps' archive from the specified analysis run and extracts
all contents into a local directory for further inspection. These files represent raw 
memory snapshots taken during execution.

Files are extracted as-is without renaming or classification.

Output path logic:
- If `save_path` is valid, dumps go to `{save_path}/memdumps/{webid}`
- If not, fallback is `memdumps/{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,
        "info": "Info string detailing how many memory dumps were downloaded"
        "note": status message (e.g. fallback notice)
    }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
webidYes
runNo
save_pathNo

Implementation Reference

  • The primary handler function for the 'get_memory_dumps' MCP tool. It is decorated with @mcp.tool() for registration and schema inference, includes input validation via type hints and detailed docstring for IO schema, and delegates the core logic to download_memory_dumps while adding error handling.
    @mcp.tool()
    async def get_memory_dumps(webid: str, run: int = 0, save_path: Optional[str] = None) -> Dict[str, Any]:
        """
        Download and extract memory dumps from a Joe Sandbox analysis.
    
        This tool retrieves the 'memdumps' archive from the specified analysis run and extracts
        all contents into a local directory for further inspection. These files represent raw 
        memory snapshots taken during execution.
    
        Files are extracted as-is without renaming or classification.
    
        Output path logic:
        - If `save_path` is valid, dumps go to `{save_path}/memdumps/{webid}`
        - If not, fallback is `memdumps/{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,
                "info": "Info string detailing how many memory dumps were downloaded"
                "note": status message (e.g. fallback notice)
            }
        """
        try:
            return await download_memory_dumps(webid, run, save_path)
        except Exception as e:
            return {
                "error": f"Failed to download memory dumps for submission ID '{webid}' run {run}. "
                         f"Reason: {str(e)}"
            }
  • Supporting utility function that performs the actual download of the memdumps ZIP from Joe Sandbox API using jbxapi client, handles directory creation with fallback logic, extracts the ZIP contents, lists the extracted files, and returns structured output including paths and counts.
    async def download_memory_dumps(
        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="memdumps")
    
        default_output_dir = os.path.join("memdumps", f"{webid}-{run}")
        output_dir = default_output_dir
        used_default_path = False
    
        if save_path:
            try:
                output_dir = os.path.join(save_path, "memdumps", 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)
    
            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),
            "info": f"{len(extracted_files)} memory dumps downloaded",
            "note": note,
        }
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 behavioral traits: it describes the extraction process ('extracts all contents into a local directory'), file handling ('extracted as-is without renaming or classification'), and output path logic with fallback behavior. It doesn't mention permissions, rate limits, or error handling, but provides substantial operational context.

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 efficiently structured with purpose first, then behavioral details, output logic, and parameter explanations. Every sentence adds value with zero waste, and it's appropriately sized for a tool with 3 parameters and complex behavior.

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 provides substantial context including purpose, behavior, parameter semantics, and return value structure. It lacks details about authentication requirements, error conditions, or rate limits, but covers most operational aspects well given the complexity.

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

Parameters5/5

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

With 0% schema description coverage, the description fully compensates by explaining all 3 parameters: webid ('Joe Sandbox analysis ID'), run ('Run index with default 0'), and save_path ('Optional base path to save dumps'). It adds meaningful context beyond basic types, including default values and optional status.

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 and extract memory dumps') and resource ('from a Joe Sandbox analysis'), distinguishing it from siblings like get_analysis_info or get_dropped_files which handle different data types. It precisely defines what the tool does with memory snapshots.

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 provides clear context about when to use this tool (for retrieving memory dumps from Joe Sandbox analyses) but doesn't explicitly mention when not to use it or name specific alternatives among the sibling tools. The context is well-defined but lacks explicit exclusion 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