Skip to main content
Glama
joesecurity

JoeSandboxMCP

Official
by joesecurity

get_ai_summaries

Retrieve AI-generated analysis summaries for specific malware analysis runs from Joe Sandbox Cloud to understand threat behavior across different system environments.

Instructions

Retrieve the AI summaries for a specific analysis run, either from cache or by downloading it.

Joe Sandbox analyses may run on multiple system configurations (e.g., different Windows/Linux variants).
Each run is indexed in the `runs` array of the analysis metadata. This function retrieves the report
corresponding to a specific run.

Args:
    webid: The submission ID of the analysis (unique identifier).
    run (optional, default = 0): The index of the analysis run to retrieve the report for.
                                 Use 0 for the first run, 1 for the second, etc.
                                 If not specified, defaults to 0 (the first run).

Returns:
    A dictionary containing AI reasoning summaries with fields:
    - webid: The analysis ID
    - run: The run index
    - reasonings: List of AI reasoning entries
    - count: Number of reasoning entries found

Notes:
    - Reports are cached in memory by key: "{webid}-{run}".
    - Use `run` to distinguish between different environments used during analysis.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
webidYes
runNo

Implementation Reference

  • The handler function for the 'get_ai_summaries' MCP tool. It fetches the XML report for the specified analysis (webid and run), parses the LLM reasonings section, extracts each reasoning's text and attributes, and returns a structured list of AI summaries. Includes caching via get_or_fetch_report and error handling.
    @mcp.tool()
    async def get_ai_summaries(webid: str, run: int=0) -> Dict[str, Any]:
        """
        Retrieve the AI summaries for a specific analysis run, either from cache or by downloading it.
    
        Joe Sandbox analyses may run on multiple system configurations (e.g., different Windows/Linux variants).
        Each run is indexed in the `runs` array of the analysis metadata. This function retrieves the report
        corresponding to a specific run.
    
        Args:
            webid: The submission ID of the analysis (unique identifier).
            run (optional, default = 0): The index of the analysis run to retrieve the report for.
                                         Use 0 for the first run, 1 for the second, etc.
                                         If not specified, defaults to 0 (the first run).
    
        Returns:
            A dictionary containing AI reasoning summaries with fields:
            - webid: The analysis ID
            - run: The run index
            - reasonings: List of AI reasoning entries
            - count: Number of reasoning entries found
    
        Notes:
            - Reports are cached in memory by key: "{webid}-{run}".
            - Use `run` to distinguish between different environments used during analysis.
        """
    
        try:
            root = await get_or_fetch_report(webid, run)
            if root is None:
                return {"error": f"Could not retrieve report for submission ID '{webid}', run {run}"}
            
            # Find all reasoning elements
            reasoning_elements = root.findall('./llm/reasonings/reasoning')
            
            if not reasoning_elements:
                return {
                    "warning": "No AI reasoning summaries found in the report",
                    "webid": webid,
                    "run": run
                }
            
            # Extract the reasonings with their attributes
            reasonings = []
            for i, reasoning in enumerate(reasoning_elements):
                # Find the text element within this reasoning
                text_element = reasoning.find('./text')
                if text_element is not None and text_element.text:
                    reasoning_data = {
                        "id": i + 1,
                        "text": text_element.text
                    }
                    
                    # Add any attributes from the reasoning element
                    for key, value in reasoning.attrib.items():
                        reasoning_data[key] = value
                    
                    reasonings.append(reasoning_data)
            
            return {
                "webid": webid,
                "run": run,
                "reasonings": reasonings,
                "count": len(reasonings)
            }
            
        except Exception as e:
            return {
                "error": f"Failed to process AI summaries for submission ID '{webid}'. "
                         f"Reason: {str(e)}"
            }
  • jbxmcp/tools.py:2-17 (registration)
    The __all__ export list includes 'get_ai_summaries', indicating it is one of the public tools exported from this module.
    __all__ = [
        'submit_analysis_job',
        'search_analysis',
        'get_analysis_info',
        'get_ai_summaries',
        'get_dropped_info',
        'get_domain_info',
        'get_ip_info',
        'get_url_info',
        'get_signature_info',
        'get_unpacked_files',
        'get_pcap_file',
        'get_list_of_recent_analyses',
        'get_process_info',
        'get_memory_dumps'
    ]
  • jbxmcp/server.py:19-19 (registration)
    server.py imports the tools module, which registers all @mcp.tool() decorated functions including get_ai_summaries upon import.
    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 the full burden and effectively discloses key behavioral traits: it explains caching behavior ('Reports are cached in memory'), clarifies the purpose of the run parameter for distinguishing environments, and describes the return structure. It does not cover aspects like error handling or rate limits, 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.

Conciseness4/5

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

The description is well-structured with clear sections (purpose, args, returns, notes), front-loading the core purpose. It is appropriately sized, though the notes section could be slightly more concise, but every sentence adds valuable information without waste.

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?

Given the complexity (2 parameters, no annotations, no output schema), the description is largely complete: it covers purpose, parameters, return values, and behavioral notes. It could improve by mentioning error cases or authentication needs, but it provides sufficient context for effective tool use.

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?

The schema description coverage is 0%, so the description must compensate, and it does so comprehensively. It explains both parameters: webid as 'The submission ID of the analysis (unique identifier)' and run as 'The index of the analysis run to retrieve the report for', including default values and usage examples, adding full meaning beyond the bare schema.

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 ('Retrieve the AI summaries for a specific analysis run') and resource ('analysis run'), distinguishing it from siblings like get_analysis_info or get_list_of_recent_analyses by focusing on AI summaries rather than general analysis data.

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 for when to use this tool ('for a specific analysis run'), including optional parameter usage and default behavior. However, it does not explicitly state when not to use it or name alternatives among siblings, such as get_analysis_info for broader metadata.

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