Skip to main content
Glama
googleSandy

Google Threat Intelligence MCP Server

by googleSandy

search_iocs

Search for Indicators of Compromise (IOCs) like files, URLs, domains, and IPs in Google Threat Intelligence to identify security threats and analyze potential malware.

Instructions

Search Indicators of Compromise (IOC) in the Google Threat Intelligence platform.

You can search by for different IOC types using the entity modifier. Below, the different IOC types and the supported orders:

| Entity type | Supported orders | Default order | | ------------- | ---------------- | ------------- | | file | first_submission_date, last_submission_date, positives, times_submitted, size | last_submission_date- | | url | first_submission_date, last_submission_date, positives, times_submitted, status | last_submission_date- | | domain | creation_date, last_modification_date, last_update_date, positives | last_modification_date- | | ip | ip, last_modification_date, positives | last_modification_date- |

Note: The entity modifier can only be used ONCE per query.

You can find all available modifers at:

  • Files: https://gtidocs.virustotal.com/docs/file-search-modifiers

  • URLs: https://gtidocs.virustotal.com/docs/url-search-modifiers

  • Domains: https://gtidocs.virustotal.com/docs/domain-search-modifiers

  • IP Addresses: https://gtidocs.virustotal.com/docs/ip-address-search-modifiers

With integer modifers, use the - and + characters to indicate:

  • Greater than: p:60+

  • Less than: p:60-

  • Equal to: p:60

Args query (required): Search query to find IOCs. limit: Limit the number of IoCs to retrieve. 10 by default. order_by: Order the results. "last_submission_date-" by default.

Returns: List of Indicators of Compromise (IoCs).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
limitNo
order_byNolast_submission_date-
api_keyNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for search_iocs tool. Searches Indicators of Compromise (IOC) in Google Threat Intelligence platform. Uses query, limit, order_by, and api_key parameters. Calls vt_client and uses helper utilities to fetch and sanitize results.
    @server.tool()
    async def search_iocs(query: str, ctx: Context, limit: int = 10, order_by: str = "last_submission_date-", api_key: str = None) -> typing.List[typing.Dict[str, typing.Any]]:
      """Search Indicators of Compromise (IOC) in the Google Threat Intelligence platform.
    
      You can search by for different IOC types using the `entity` modifier. Below, the different IOC types and the supported orders:
    
        | Entity type   | Supported orders | Default order |
        | ------------- | ---------------- | ------------- |
        | file          | first_submission_date, last_submission_date, positives, times_submitted, size	    | last_submission_date- |
        | url           | first_submission_date, last_submission_date, positives, times_submitted, status   | last_submission_date- |
        | domain        | creation_date, last_modification_date, last_update_date, positives                | last_modification_date- |
        | ip            | ip, last_modification_date, positives                                             | last_modification_date- |
    
      Note: The `entity` modifier can only be used ONCE per query.
    
      You can find all available modifers at:
        - Files: https://gtidocs.virustotal.com/docs/file-search-modifiers
        - URLs: https://gtidocs.virustotal.com/docs/url-search-modifiers
        - Domains: https://gtidocs.virustotal.com/docs/domain-search-modifiers
        - IP Addresses: https://gtidocs.virustotal.com/docs/ip-address-search-modifiers
    
      With integer modifers, use the `-` and `+` characters to indicate:
        - Greater than: `p:60+`
        - Less than: `p:60-`
        - Equal to: `p:60`
    
      Args
        query (required): Search query to find IOCs.
        limit: Limit the number of IoCs to retrieve. 10 by default.
        order_by: Order the results. "last_submission_date-" by default.
    
      Returns:
        List of Indicators of Compromise (IoCs).
      """
      async with vt_client(ctx, api_key=api_key) as client:
        res = await utils.consume_vt_iterator(
            client,
            "/intelligence/search",
            params={
                "query": query,
                "order": order_by},
            limit=limit)
      return utils.sanitize_response([o.to_dict() for o in res])
  • Registration of search_iocs tool via @server.tool() decorator from FastMCP framework. The decorator automatically registers the function as an available MCP tool.
    @server.tool()
  • Helper function consume_vt_iterator used by search_iocs to iterate through VirusTotal API results and return them as a list of objects.
    async def consume_vt_iterator(
        vt_client: vt.Client, endpoint: str, params: dict | None = None, limit: int = 10):
      """Consumes a vt.Iterator iterator and return the list of objects."""
      res = []
      async for obj in vt_client.iterator(endpoint, params=params, limit=limit):
        res.append(obj)
      return res
  • Helper function sanitize_response used by search_iocs to clean up the API response by recursively removing empty dictionaries and lists.
    def sanitize_response(data: typing.Any) -> typing.Any:
      """Removes empty dictionaries and lists recursively from a response."""
      if isinstance(data, dict):
        sanitized_dict = {}
        for key, value in data.items():
          sanitized_value = sanitize_response(value)
          if sanitized_value is not None:
            sanitized_dict[key] = sanitized_value
        return sanitized_dict
      elif isinstance(data, list):
        sanitized_list = []
        for item in data:
          sanitized_item = sanitize_response(item)
          if sanitized_item is not None:
            sanitized_list.append(sanitized_item)
        return sanitized_list
      elif isinstance(data, str):
        return data if data else None
      else:
        return data
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 mentions that the 'entity' modifier can only be used once per query and explains integer modifier syntax, which adds useful operational context. However, it doesn't cover critical behavioral traits such as authentication needs (implied by 'api_key' parameter but not stated), rate limits, pagination, error handling, or what 'List of Indicators of Compromise' entails in practice. For a search tool with no annotation coverage, this leaves significant gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

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

The description is appropriately sized but not optimally structured. It front-loads the purpose clearly, but includes a detailed table and external links that might be verbose for an AI agent. The 'Args' and 'Returns' sections are helpful but could be integrated more seamlessly. While informative, some sentences (e.g., the table and link list) may not earn their place in a concise tool description for agent use.

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 (search tool with multiple IOC types and modifiers), no annotations, and an output schema present (which covers return values), the description is moderately complete. It explains key usage aspects like modifiers and ordering, but lacks details on authentication, error handling, and practical constraints. With an output schema, it doesn't need to explain return values, but other contextual gaps remain, making it adequate but not fully comprehensive.

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?

The schema description coverage is 0%, so the description must compensate. It adds substantial meaning beyond the schema: it explains the 'query' parameter in detail (e.g., using 'entity' modifier, supported IOC types, order options, and integer modifier syntax), clarifies 'order_by' with a table of default orders per entity type, and mentions 'limit' with its default. However, it doesn't address the 'api_key' parameter at all. Given the low schema coverage, the description does a good job but misses one parameter.

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: 'Search Indicators of Compromise (IOC) in the Google Threat Intelligence platform.' It specifies the verb ('Search') and resource ('Indicators of Compromise'), but doesn't explicitly differentiate it from sibling tools like 'search_campaigns' or 'search_threats', which also search different entities in the same platform. This makes it clear but not fully sibling-distinctive.

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

Usage Guidelines3/5

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

The description provides implied usage guidance by detailing how to search different IOC types (file, url, domain, ip) with the 'entity' modifier and linking to external docs for modifiers. However, it doesn't explicitly state when to use this tool versus alternatives like 'get_file_report' or 'search_threats', nor does it mention any exclusions or prerequisites. This offers some context but lacks direct comparative 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/googleSandy/gti-mcp-standalone'

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