Skip to main content
Glama
googleSandy

Google Threat Intelligence MCP Server

by googleSandy

get_domain_report

Retrieve a detailed domain analysis report from Google Threat Intelligence to assess security risks and detect threats.

Instructions

Get a comprehensive domain analysis report from Google Threat Intelligence.

Args: domain (required): Domain to analyse. Returns: Report with insights about the domain.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYes
api_keyNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main tool handler function that fetches a comprehensive domain analysis report from Google Threat Intelligence. It uses vt_client context manager, calls utils.fetch_object with the domain, and returns sanitized response.
    async def get_domain_report(domain: str, ctx: Context, api_key: str = None) -> typing.Dict[str, typing.Any]:
      """Get a comprehensive domain analysis report from Google Threat Intelligence.
    
      Args:
        domain (required): Domain to analyse.
      Returns:
        Report with insights about the domain.
      """
      async with vt_client(ctx, api_key=api_key) as client:
        res = await utils.fetch_object(
            client,
            "domains",
            "domain",
            domain,
            relationships=DOMAIN_KEY_RELATIONSHIPS,
            params={"exclude_attributes": "last_analysis_results"})
      return utils.sanitize_response(res)
  • Helper function fetch_object that queries the VT API for domain data with specified relationships and parameters. Used by get_domain_report.
    async def fetch_object(
        vt_client: vt.Client,
        resource_collection_type: str,
        resource_type: str,
        resource_id: str,
        attributes: list[str] | None = None,
        relationships: list[str] | None = None,
        params: dict[str, typing.Any] | None = None):
      """Fetches objects from Google Threat Intelligence API."""
      logging.info(
          f"Fetching comprehensive {resource_collection_type} "
          f"report for id: {resource_id}")
      
      params = {k: v for k, v in params.items()} if params else {}
    
      # Retrieve a selection of object attributes and/or relationships.
      if attributes:
        params["attributes"] = ",".join(attributes)
      if relationships:
        params["relationships"] = ",".join(relationships)
    
      try:
        obj = await vt_client.get_object_async(
            f"/{resource_collection_type}/{resource_id}", params=params)
    
        if obj.error:
          logging.error(
              f"Error fetching main {resource_type} report for {resource_id}: {obj.error}"
          )
          return {
              "error": f"Failed to get main {resource_type} report: {obj.error}",
              # "details": report.get("details"),
          }
      except vt.error.APIError as e:
        logging.warning(
            f"VirusTotal API Error fetching {resource_type} {resource_id}: {e.code} - {e.message}"
        )
        return {
            "error": f"VirusTotal API Error: {e.code} - {e.message}",
            "details": f"The requested {resource_type} '{resource_id}' could not be found or there was an issue with the API request."
        }
      except Exception as e:
        logging.exception(
            f"Unexpected error fetching {resource_type} {resource_id}: {e}"
        )
        return {"error": "An unexpected internal error occurred."}
    
      # Build response.
      obj_dict = obj.to_dict()
      obj_dict['id'] = obj.id
      if 'aggregations' in obj_dict['attributes']:
        del obj_dict['attributes']['aggregations']
    
      logging.info(
          f"Successfully generated concise threat summary for id: {resource_id}")
      return obj_dict
  • Helper function sanitize_response that recursively removes empty dicts/lists from the API response before returning.
    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
  • DOMAIN_KEY_RELATIONSHIPS - the key relationships list (associations) passed to fetch_object for the domain report.
    DOMAIN_KEY_RELATIONSHIPS = [
        "associations",
    ]
  • The @server.tool() decorator on line 91 registers get_domain_report as an MCP tool. The tools are loaded via 'from gti_mcp.tools import *' at line 73.
    # Load tools.
    from gti_mcp.tools import *
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must disclose behavioral traits. It does not mention authentication via api_key, rate limits, error handling, or the scope of the report. The description only states the basic purpose, failing to inform the agent about important runtime behaviors.

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 short (three sentences) and front-loaded with the purpose. However, it could be more efficient by omitting the redundant 'Args:' and 'Returns:' labels since they add little value. Overall, it is concise but not overly so.

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

Completeness2/5

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

Given the lack of annotations and the presence of two parameters (one undocumented), the description is incomplete. It does not cover the api_key parameter, does not explain what the report contains (beyond 'insights'), and lacks behavioral context. The output schema exists but the description does not leverage it to reduce the burden.

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

Parameters2/5

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

With 0% schema description coverage, the description must compensate. It explains 'domain' as 'Domain to analyse' but does not specify format or constraints. The 'api_key' parameter is not mentioned at all, leaving its semantic role completely undocumented.

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 action ('Get'), the resource ('comprehensive domain analysis report'), and the source ('Google Threat Intelligence'). It is specific and distinguishes from sibling tools which target different entities (file, IP, URL, etc.).

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives. There is no mention of prerequisites, when not to use, or comparison with sibling report tools. The description assumes the user knows the tool is for domain analysis.

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