Skip to main content
Glama
joesecurity

JoeSandboxMCP

Official
by joesecurity

search_analysis

Search the JoeSandbox Cloud for malware analyses using structured parameters like file hashes, threat names, detection status, and dates to identify security threats.

Instructions

Search the JoeSandbox Cloud for malware analyses using structured search parameters.

Args:
    - md5, sha1, sha256: Exact match
    - filename, url, tag, comments, ioc_url, ioc_dropped-file: Substring match
    - detection: One of 'clean', 'suspicious', 'malicious', 'unknown'
    - threatname: Exact match
    - before_date, after-date: ISO 8601 format (YYYY-MM-DD). These are exclusive (the date itself is not included).
    - ioc_domain, ioc_public_ip: Exact match

    Notes:
        - You must provide at least one of the supported parameters.
        - If multiple parameters are provided, all conditions must match (AND logic).
        - Searches are case-insensitive.
        - On the Cloud version, date comparisons use the CET/CEST time zone.
        - The 'q' parameter is not supported and should not be used.

    Examples:
        {"md5": "661f3e4454258ca6ab1a4c31742916c0"}
        {"threatname": "agenttesla", "before_date": "2024-12-01"}
        {"filename": "agent.exe", "detection": "malicious"}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
md5No
sha1No
sha256No
filenameNo
urlNo
tagNo
commentsNo
ioc_urlNo
ioc_dropped_fileNo
detectionNo
threatnameNo
before_dateNo
after_dateNo
ioc_domainNo
ioc_public_ipNo

Implementation Reference

  • Primary handler for the 'search_analysis' MCP tool. Defines input parameters with types and docstring schema. Decorated with @mcp.tool() for automatic registration. Constructs query dict from args and delegates to make_search_request helper.
    @mcp.tool()
    async def search_analysis(
        md5: Optional[str] = None,
        sha1: Optional[str] = None,
        sha256: Optional[str] = None,
        filename: Optional[str] = None,
        url: Optional[str] = None,
        tag: Optional[str] = None,
        comments: Optional[str] = None,
        ioc_url: Optional[str] = None,
        ioc_dropped_file: Optional[str] = None,
        detection: Optional[Literal["clean", "suspicious", "malicious", "unknown"]] = None,
        threatname: Optional[str] = None,
        before_date: Optional[str] = None,
        after_date: Optional[str] = None,
        ioc_domain: Optional[str] = None,
        ioc_public_ip: Optional[str] = None,
        ) -> str:
        """
        Search the JoeSandbox Cloud for malware analyses using structured search parameters.
    
        Args:
            - md5, sha1, sha256: Exact match
            - filename, url, tag, comments, ioc_url, ioc_dropped-file: Substring match
            - detection: One of 'clean', 'suspicious', 'malicious', 'unknown'
            - threatname: Exact match
            - before_date, after-date: ISO 8601 format (YYYY-MM-DD). These are exclusive (the date itself is not included).
            - ioc_domain, ioc_public_ip: Exact match
    
            Notes:
                - You must provide at least one of the supported parameters.
                - If multiple parameters are provided, all conditions must match (AND logic).
                - Searches are case-insensitive.
                - On the Cloud version, date comparisons use the CET/CEST time zone.
                - The 'q' parameter is not supported and should not be used.
    
            Examples:
                {"md5": "661f3e4454258ca6ab1a4c31742916c0"}
                {"threatname": "agenttesla", "before_date": "2024-12-01"}
                {"filename": "agent.exe", "detection": "malicious"}
        """
        query = {
            k.replace('_', '-'): v
            for k, v in locals().items()
            if v is not None and k != "self"
        }
        res = await make_search_request(query)
        if not res:
            return "No results or an error occurred during the search."
        return str(res)
  • Core helper function implementing the HTTP search request to Joe Sandbox API. Called by the search_analysis handler to execute the search query.
    async def make_search_request(query_dict: Dict[str, str]) -> Optional[Dict[str, Any]]:
        """
        Query jbxapi for a search in the existing analyses.
        
        Args:
            query_dict: A dictionary of search parameters.
            
        Returns:
            The search results as a dictionary, or None if the search failed.
        """
        query_dict['apikey'] = os.getenv("JBXAPIKEY")
        async with httpx.AsyncClient() as client:
            try:
                response = await client.post(JBXCLOUD_APIURL + "v2/analysis/search", data=query_dict)
                return response.json()
            except Exception as e:
                print(f"Error during analysis search: {e}")
                return None
  • jbxmcp/tools.py:2-17 (registration)
    __all__ export list in tools.py includes 'search_analysis', facilitating module-level registration/import.
    __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'
    ]
  • Function signature defines the input schema with optional parameters, types, and return type for the tool.
    async def search_analysis(
        md5: Optional[str] = None,
        sha1: Optional[str] = None,
        sha256: Optional[str] = None,
        filename: Optional[str] = None,
        url: Optional[str] = None,
        tag: Optional[str] = None,
        comments: Optional[str] = None,
        ioc_url: Optional[str] = None,
        ioc_dropped_file: Optional[str] = None,
        detection: Optional[Literal["clean", "suspicious", "malicious", "unknown"]] = None,
        threatname: Optional[str] = None,
        before_date: Optional[str] = None,
        after_date: Optional[str] = None,
        ioc_domain: Optional[str] = None,
        ioc_public_ip: Optional[str] = None,
        ) -> str:
Behavior5/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 delivers excellent behavioral transparency. It discloses critical operational details: case-insensitive searches, AND logic for multiple parameters, time zone considerations (CET/CEST), exclusive date handling, and explicit warnings about unsupported parameters ('q' parameter not supported).

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 (Args, Notes, Examples) and every sentence adds value. It could be slightly more front-loaded by moving the 'must provide at least one parameter' requirement earlier, but overall it's efficiently organized with no wasted text.

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 complex 15-parameter search tool with no annotations and no output schema, the description provides excellent coverage of input behavior, constraints, and examples. The main gap is lack of information about return values (format, pagination, etc.), but given the tool's primary focus is search filtering rather than output structure, this is a minor omission.

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?

Given 0% schema description coverage and 15 parameters, the description compensates fully by explaining each parameter's matching behavior (exact vs substring match), providing format requirements (ISO 8601 for dates), enumerating detection values, and giving concrete examples. This adds substantial 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 tool's purpose: 'Search the JoeSandbox Cloud for malware analyses using structured search parameters.' It specifies the exact resource ('malware analyses'), the platform ('JoeSandbox Cloud'), and the method ('structured search parameters'), distinguishing it from sibling tools like 'get_list_of_recent_analyses' which likely returns unfiltered recent analyses.

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 usage context with the note 'You must provide at least one of the supported parameters' and explains AND logic for multiple parameters. However, it doesn't explicitly state when to use this tool versus alternatives like 'get_list_of_recent_analyses' or other sibling tools, though the structured search focus is implied.

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