Skip to main content
Glama
googleSandy

Google Threat Intelligence MCP Server

by googleSandy

search_iocs

Search for Indicators of Compromise (IOCs) across files, URLs, domains, and IP addresses using entity-specific modifiers and ordering options.

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 the 'search_iocs' tool. It takes a query string, optional limit, order_by, and api_key parameters. Uses vt_client to query the '/intelligence/search' endpoint via consume_vt_iterator and returns sanitized results.
    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])
  • The consume_vt_iterator helper used by search_iocs to iterate through VT API results up to a given limit.
    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
  • The sanitize_response helper used by search_iocs to remove empty dicts/lists from the final response.
    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
  • The FastMCP server initialization (line 67-70) and wildcard import of tools (line 73) that registers search_iocs as a tool via the @server.tool() decorator.
    server = FastMCP(
        "Google Threat Intelligence MCP server",
        dependencies=["vt-py"],
        stateless_http=stateless)
  • The __init__.py re-exports all tools from intelligence.py, making search_iocs available through the wildcard import in server.py.
    from .collections import *
    from .files import *
    from .intelligence import *
    from .netloc import *
    from .threat_profiles import *
    from .urls import *
Behavior4/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. It explains the search behavior, ordering, and limit defaults. However, it does not explicitly state read-only nature or rate limits. The description is transparent but could be slightly improved.

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 tables and sections, and it front-loads the main purpose. While it includes external links, every sentence adds value. It is appropriately sized for the detail provided.

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

Completeness5/5

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

Given the complexity of IOC search with multiple entity types and modifiers, and the presence of an output schema, the description is highly complete. It covers query syntax, entity types, ordering, and defaults, leaving little ambiguity for an AI agent.

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?

Schema coverage is 0%, so the description fully compensates. It explains the query parameter, limit default, order_by values per entity type, and the api_key parameter. The description adds significant meaning beyond the schema, including entity modifier usage and ordering syntax.

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 searches Indicators of Compromise in the Google Threat Intelligence platform. It distinguishes from sibling search tools by focusing on IOC types and providing specific entity types.

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

Usage Guidelines5/5

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

The description provides explicit guidance on how to use the tool, including the `entity` modifier, supported orders per entity type, and restrictions (entity modifier only once per query). It also links to external documentation for further modifiers and explains integer modifier syntax.

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