Skip to main content
Glama
4tal

MCP Google Contacts Server

by 4tal

create_contact_group

Organize Google Contacts by creating labeled groups to categorize contacts like work colleagues, family, or clubs.

Instructions

Create a new contact group (label) to organize your contacts.

    Args:
        name: Name for the new contact group (e.g., "Work Colleagues", "Family", "Book Club")
        client_data: Optional custom data as list of key-value pairs (e.g., [{"key": "color", "value": "blue"}])
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
client_dataNo

Implementation Reference

  • The MCP tool handler for 'create_contact_group'. This async function is decorated with @mcp.tool() for registration and implements the tool logic by calling the service method.
    @mcp.tool()
    async def create_contact_group(name: str, client_data: List[Dict[str, str]] = None) -> str:
        """Create a new contact group (label) to organize your contacts.
    
        Args:
            name: Name for the new contact group (e.g., "Work Colleagues", "Family", "Book Club")
            client_data: Optional custom data as list of key-value pairs (e.g., [{"key": "color", "value": "blue"}])
        """
        service = init_service()
        if not service:
            return "Error: Google Contacts service is not available. Please check your credentials."
    
        try:
            group = service.create_contact_group(name, client_data)
            return f"Contact group created successfully!\n\n{format_contact_group(group)}"
        except Exception as e:
            return f"Error: Failed to create contact group - {str(e)}"
  • The core helper method in GoogleContactsService that performs the actual Google Contacts API call to create the contact group.
    def create_contact_group(
        self, name: str, client_data: Optional[List[Dict[str, str]]] = None
    ) -> Dict[str, Any]:
        """Create a new contact group.
    
        Args:
            name: Name for the new contact group
            client_data: Optional client-specific data
    
        Returns:
            Created contact group dictionary
        """
        try:
            contact_group_body = {"contactGroup": {"name": name}}
    
            if client_data:
                contact_group_body["contactGroup"]["clientData"] = client_data
    
            response = self.service.contactGroups().create(body=contact_group_body).execute()
            return self._format_contact_group(response)
    
        except HttpError as error:
            raise GoogleContactsError(f"Error creating contact group: {error}")
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is a creation operation but doesn't cover critical aspects like required permissions, whether it's idempotent, error conditions, or what happens on success/failure. The description adds minimal behavioral context beyond the basic action.

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 and a structured Args section. The first sentence states the purpose clearly, and the Args section efficiently explains parameters with examples. No unnecessary information is included, though the formatting could be slightly cleaner.

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 creation tool with no annotations and no output schema, the description is moderately complete. It covers the basic action and parameters well but lacks behavioral details like permissions, side effects, or return values. Given the complexity of a write operation, more context would be helpful for safe invocation.

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?

Schema description coverage is 0%, so the description must compensate. It provides clear semantics for both parameters: 'name' is explained with examples of group names, and 'client_data' is described as optional custom key-value pairs with an example. This adds meaningful context beyond the bare schema.

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 verb 'Create' and resource 'new contact group (label)', specifying its purpose to organize contacts. It distinguishes from siblings like 'update_contact_group' or 'list_contact_groups' by focusing on creation, though it doesn't explicitly contrast with other creation tools like 'create_contact'.

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 is provided on when to use this tool versus alternatives. It doesn't mention prerequisites, such as needing appropriate permissions, or compare to other creation tools like 'create_contact' or 'create_contact_advanced', leaving the agent to infer usage context.

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