Skip to main content
Glama
googleSandy

Google Threat Intelligence MCP Server

by googleSandy

update_collection_attributes

Update collection attributes such as name, description, privacy setting, tags, or alternative names using the collection ID.

Instructions

Allows updating a collection's attributes (such as name or description) Args: id (required): The ID of the collection to update. attributes: Available attributes in a collection: * name: string * description: string * private: boolean * tags: array of strings * alt_names: array of strings Returns: A dictionary representing the updated collection.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
attributesNo
api_keyNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Handler function that updates a collection's attributes via PATCH /collections/{id} API call. Decorated with @server.tool() to register as an MCP tool.
    @server.tool()
    async def update_collection_attributes(
        id: str,
        ctx: Context,
        attributes: typing.Dict[str, typing.Any] = None,
        api_key: str = None,
    ) -> typing.Dict[str, typing.Any]:
      """Allows updating a collection's attributes (such as name or description)
      Args:
        id (required): The ID of the collection to update.
        attributes: Available attributes in a collection:
            *  name: string
            *  description: string
            *  private: boolean
            *  tags: array of strings
            *  alt_names: array of strings
      Returns:
        A dictionary representing the updated collection.
      """
      async with vt_client(ctx, api_key=api_key) as client:
        collection_data = {"data": {"attributes": attributes, "type": "collection"}}          
    
        res = await client.patch_async(
            f"/collections/{id}", json_data=collection_data
        )
        data = await res.json_async()
      return utils.sanitize_response(data["data"])
  • Tool registration via @server.tool() decorator on the function. The server object is created in gti_mcp/server.py and tools are imported via gti_mcp/tools/__init__.py from line 72 in server.py: 'from gti_mcp.tools import *'
    @server.tool()
    async def update_collection_attributes(
        id: str,
        ctx: Context,
        attributes: typing.Dict[str, typing.Any] = None,
        api_key: str = None,
    ) -> typing.Dict[str, typing.Any]:
      """Allows updating a collection's attributes (such as name or description)
      Args:
        id (required): The ID of the collection to update.
        attributes: Available attributes in a collection:
            *  name: string
            *  description: string
            *  private: boolean
            *  tags: array of strings
            *  alt_names: array of strings
      Returns:
        A dictionary representing the updated collection.
      """
      async with vt_client(ctx, api_key=api_key) as client:
        collection_data = {"data": {"attributes": attributes, "type": "collection"}}          
    
        res = await client.patch_async(
            f"/collections/{id}", json_data=collection_data
        )
        data = await res.json_async()
      return utils.sanitize_response(data["data"])
  • Helper utility sanitize_response used to clean up the API response by recursively removing empty dicts 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 provided, so the description carries full burden. It mentions it updates attributes and returns a dictionary, but does not disclose any behavioral traits like authentication requirements, potential side effects, or error conditions.

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 uses a verbose docstring format with separate Args and Returns sections. While it contains useful information, it is not particularly concise and could be streamlined.

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?

The tool has 3 parameters and no annotations. The description covers the main purpose and return value, but lacks details on error handling, optional parameters, and parameter constraints beyond the listed attributes.

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

Parameters3/5

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

The input schema has 0% coverage, so the description adds value by listing available attributes (name, description, private, tags, alt_names). However, it omits the 'api_key' parameter entirely, leaving its purpose unclear.

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 updates a collection's attributes (name, description, etc.). It distinguishes itself from siblings like 'update_iocs_in_collection' which updates IOCs, not attributes.

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 such as 'create_collection' or other update tools. The description only states what it does, not when it's appropriate.

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