Skip to main content
Glama
googleSandy

Google Threat Intelligence MCP Server

by googleSandy

search_campaigns

Search threat campaigns in Google Threat Intelligence to investigate collections of threats, then retrieve detailed reports for analysis.

Instructions

Search threat campaigns in the Google Threat Intelligence platform.

Campaigns are modeled as collections. Once you get collections from this tool, you can use get_collection_report to fetch the full reports and their relationships.

You can use order_by to sort the results by: "relevance", "creation_date". You can use the sign "+" to make it order ascending, or "-" to make it descending. By default is "relevance-"

Args: query (required): Search query to find threats. limit: Limit the number of threats to retrieve. 10 by default. order_by: Order results by the given order key. "relevance-" by default.

Returns: List of collections, aka threats.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
limitNo
order_byNorelevance-
api_keyNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The search_campaigns tool handler - decorated with @server.tool() and implements the search logic for threat campaigns by calling _search_threats_by_collection_type with 'campaign' as the collection type
    @server.tool()
    @server.tool()
    async def search_campaigns(
        query: str, ctx: Context, limit: int = 10, order_by: str = "relevance-", api_key: str = None
    ) -> typing.List[typing.Dict[str, typing.Any]]:
      """Search threat campaigns in the Google Threat Intelligence platform.
    
      Campaigns are modeled as collections. Once you get collections from this tool, you can use `get_collection_report` to fetch the full reports and their relationships.
    
      You can use order_by to sort the results by: "relevance", "creation_date". You can use the sign "+" to make it order ascending, or "-" to make it descending. By default is "relevance-"
    
      Args:
        query (required): Search query to find threats.
        limit: Limit the number of threats to retrieve. 10 by default.
        order_by: Order results by the given order key. "relevance-" by default.
    
      Returns:
        List of collections, aka threats.
      """
      res = await _search_threats_by_collection_type(
          query, "campaign", ctx, limit, order_by, api_key=api_key)
      return res
  • Helper function _search_threats_by_collection_type that performs the actual API call to the Google Threat Intelligence platform /collections endpoint with filtering by collection_type and sanitizes the response
    async def _search_threats_by_collection_type(
        query: str,
        collection_type: str,
        ctx: Context,
        limit: int = 10,
        order_by: str = "relevance-",
        api_key: str = None,
    ) -> typing.List[typing.Dict[str, typing.Any]]:
      """Search a given threat type in the Google Threat Intelligence platform,
    
      Args:
        query (required): Search query to find threats. If you want any threat, just pass an empty string.
        collection_type (required): Collection type. One of: "threat-actor", "malware-family", "campaign", "report", "vulnerability", "collection".
        limit: Limit the number of threats to retrieve. 10 by default.
        order_by: Order results by the given order key. "relevance-" by default.
    
      Returns:
        List of collections, aka threats.
      """
      if collection_type not in COLLECTION_TYPES:
          raise ValueError(
              f"wrong collection_type. Available collection_type are: {','.join(COLLECTION_TYPES)} ")
    
      async with vt_client(ctx, api_key=api_key) as client:
        res = await utils.consume_vt_iterator(
            client,
            "/collections",
            params={
                "filter": f"collection_type:{collection_type} {query}",
                "order": order_by,
                "relationships": COLLECTION_KEY_RELATIONSHIPS,
                "exclude_attributes": COLLECTION_EXCLUDED_ATTRS,
            },
            limit=limit,
        )
      return utils.sanitize_response([o.to_dict() for o in res])
  • COLLECTION_TYPES schema definition - a set of valid collection types that includes 'campaign' and is used for validation in the helper function
    COLLECTION_TYPES = {
        "threat-actor",
        "malware-family",
        "campaign",
        "report",
        "software-toolkit",
        "vulnerability",
        "collection",
    }
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains that campaigns are modeled as collections and describes ordering behavior (ascending/descending with + and - signs). However, it doesn't mention authentication requirements (though api_key is in the schema), rate limits, pagination, or error conditions that would be important for a search tool.

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

Conciseness5/5

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

The description is well-structured with clear sections, front-loaded purpose statement, and zero wasted sentences. Each paragraph adds value: the first establishes context, the second explains related tools, the third details ordering behavior, and the parameter/return sections are clearly labeled.

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 tool has an output schema (returns list of collections) and the description explains the relationship between campaigns and collections, the description is mostly complete. However, for a search tool with no annotations, it could benefit from more behavioral context about authentication, rate limits, or error handling.

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?

With 0% schema description coverage, the description compensates well by explaining all three main parameters (query, limit, order_by) with their purposes, defaults, and format details for order_by. The api_key parameter is not mentioned in the description, but the three documented parameters cover the core functionality adequately.

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 for threat campaigns in the Google Threat Intelligence platform, specifying both the action (search) and resource (threat campaigns). It distinguishes from sibling tools by mentioning that campaigns are modeled as collections and explicitly names get_collection_report as a related tool for further actions.

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 (searching threat campaigns) and mentions get_collection_report as a follow-up tool for fetching full reports. However, it doesn't explicitly state when NOT to use this tool or compare it to similar search tools like search_threats or search_threat_reports among the siblings.

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