Skip to main content
Glama
4tal

MCP Google Contacts Server

by 4tal

create_contact_advanced

Create detailed Google Contacts entries with multiple emails, phone numbers, addresses, relations, events, and custom fields in a single operation.

Instructions

Create a new contact with full field support including multiple emails, phones, addresses, etc.

    Args:
        contact_data: Dictionary containing complete contact information with support for:
            - Multiple emails: {"emails": [{"value": "email@example.com", "type": "work"}]}
            - Multiple phones: {"phones": [{"value": "+1234567890", "type": "mobile"}]}
            - Multiple addresses: {"addresses": [{"formatted": "123 Main St", "type": "home"}]}
            - Relations: {"relations": [{"person": "John Doe", "type": "spouse"}]}
            - Events: {"events": [{"date": {"month": 12, "day": 25}, "type": "anniversary"}]}
            - Custom fields: {"custom_fields": [{"key": "Department", "value": "Engineering"}]}
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contact_dataYes

Implementation Reference

  • The handler function decorated with @mcp.tool(), implementing the core logic for creating advanced contacts by calling the GoogleContactsService.
    @mcp.tool()
    async def create_contact_advanced(contact_data: Dict[str, Any]) -> str:
        """Create a new contact with full field support including multiple emails, phones, addresses, etc.
    
        Args:
            contact_data: Dictionary containing complete contact information with support for:
                - Multiple emails: {"emails": [{"value": "email@example.com", "type": "work"}]}
                - Multiple phones: {"phones": [{"value": "+1234567890", "type": "mobile"}]}
                - Multiple addresses: {"addresses": [{"formatted": "123 Main St", "type": "home"}]}
                - Relations: {"relations": [{"person": "John Doe", "type": "spouse"}]}
                - Events: {"events": [{"date": {"month": 12, "day": 25}, "type": "anniversary"}]}
                - Custom fields: {"custom_fields": [{"key": "Department", "value": "Engineering"}]}
        """
        service = init_service()
        if not service:
            return "Error: Google Contacts service is not available. Please check your credentials."
    
        try:
            contact = service.create_contact(contact_data)
            return f"Advanced contact created successfully!\n\n{format_contact(contact)}"
        except Exception as e:
            return f"Error: Failed to create advanced contact - {str(e)}"
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While it states this is a creation operation ('Create a new contact'), it doesn't mention whether this requires specific permissions, what happens on duplicate contacts, whether the operation is idempotent, or what the response looks like (e.g., returns a contact ID). For a mutation tool with zero annotation coverage, this leaves significant behavioral gaps.

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 and front-loaded with the core purpose in the first sentence. The parameter documentation is detailed but necessary given the complex nested structure. The formatting with bullet points improves readability, though the indentation in the provided text is slightly irregular.

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?

Given the tool's complexity (mutation operation with nested objects, no annotations, no output schema), the description is partially complete. It excels at parameter semantics but lacks behavioral context (permissions, response format, error handling) and usage guidelines. For a creation tool with rich parameter requirements, more comprehensive coverage would be beneficial.

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

Parameters5/5

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

The schema description coverage is 0%, so the description must fully compensate. It provides extensive semantic details about the 'contact_data' parameter, including specific examples of supported nested structures (emails, phones, addresses, relations, events, custom fields) with formatting examples. This adds substantial value beyond the minimal schema, making the parameter's expected structure and content clear.

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 tool's purpose: 'Create a new contact with full field support including multiple emails, phones, addresses, etc.' It specifies the verb ('create') and resource ('contact'), and distinguishes itself from the simpler 'create_contact' sibling by emphasizing 'full field support' and 'advanced' capabilities. However, it doesn't explicitly contrast with 'update_contact_advanced' for creation vs. update scenarios.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose 'create_contact_advanced' over the simpler 'create_contact', or when to use it versus 'update_contact_advanced' for modifying existing contacts. There's no context about prerequisites, permissions, or typical use cases beyond the basic functionality.

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