Skip to main content
Glama
4tal

MCP Google Contacts Server

by 4tal

delete_contact_group

Remove user-created contact groups from Google Contacts to organize your address book by deleting specific groups using their resource name.

Instructions

Delete a contact group. Note: This only works for user-created groups, not system groups.

    Args:
        resource_name: Contact group resource name (e.g., "contactGroups/12345")
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
resource_nameYes

Implementation Reference

  • The main MCP tool handler for 'delete_contact_group'. It is registered via @mcp.tool() decorator and handles the tool execution by calling the underlying service method.
    @mcp.tool()
    async def delete_contact_group(resource_name: str) -> str:
        """Delete a contact group. Note: This only works for user-created groups, not system groups.
    
        Args:
            resource_name: Contact group resource name (e.g., "contactGroups/12345")
        """
        service = init_service()
        if not service:
            return "Error: Google Contacts service is not available. Please check your credentials."
    
        try:
            result = service.delete_contact_group(resource_name)
            if result.get("success"):
                return f"Contact group {resource_name} deleted successfully."
            else:
                return f"Failed to delete contact group: {result.get('message', 'Unknown error')}"
        except Exception as e:
            return f"Error: Failed to delete contact group - {str(e)}"
  • The helper service method in GoogleContactsService that performs the actual Google Contacts API deletion call using self.service.contactGroups().delete().
    def delete_contact_group(self, resource_name: str) -> Dict[str, Any]:
        """Delete a contact group.
    
        Args:
            resource_name: Contact group resource name
    
        Returns:
            Success status dictionary
        """
        try:
            self.service.contactGroups().delete(resourceName=resource_name).execute()
            return {"success": True, "resourceName": resource_name}
    
        except HttpError as error:
            raise GoogleContactsError(f"Error deleting contact group: {error}")
  • src/tools.py:64-72 (registration)
    The top-level registration function that calls register_contact_group_tools(mcp), which defines and registers the delete_contact_group tool via its @mcp.tool() decorator.
    def register_tools(mcp: FastMCP) -> None:
        """Register all Google Contacts tools with the MCP server.
    
        Args:
            mcp: FastMCP server instance
        """
        register_contact_tools(mcp)
        register_directory_tools(mcp)
        register_contact_group_tools(mcp)
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 correctly indicates this is a destructive operation ('Delete') and adds important context about the user-created vs system group limitation. However, it doesn't mention permissions needed, whether deletion is reversible, or what happens to contacts in the group, leaving gaps in behavioral understanding.

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 appropriately sized with two sentences that each earn their place - the first states the purpose, the second provides a critical constraint. The Args section is properly formatted but could be more integrated with the main description text.

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?

For a destructive tool with no annotations and no output schema, the description provides the essential purpose and a key constraint. However, it lacks information about error conditions, confirmation requirements, or what happens to associated contacts, making it incomplete for safe operation despite the single parameter.

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 description provides the parameter name and an example value ('contactGroups/12345'), which adds meaning beyond the schema's 0% description coverage. However, it doesn't explain where to find resource names, format requirements beyond the example, or validation rules, so it only partially compensates for the schema's lack of documentation.

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 action ('Delete') and target ('a contact group'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'delete_contact' or 'remove_contacts_from_group', which prevents a perfect score.

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 about when NOT to use this tool ('only works for user-created groups, not system groups'), which is valuable guidance. However, it doesn't mention alternatives for system groups or explicitly compare with other deletion-related siblings, keeping it from a top score.

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/4tal/mcp-google-contacts'

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