Skip to main content
Glama
4tal

MCP Google Contacts Server

by 4tal

create_contact

Add new contacts to Google Contacts with comprehensive details including name, email, phone, organization, address, birthday, and notes.

Instructions

Create a new contact with comprehensive field support.

    Args:
        given_name: First name of the contact
        family_name: Last name of the contact
        email: Email address of the contact
        phone: Phone number of the contact
        organization: Company/organization name
        job_title: Job title or position
        address: Physical address
        birthday: Birthday in YYYY-MM-DD format
        website: Website URL
        notes: Notes or biography
        nickname: Nickname
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
given_nameYes
family_nameNo
emailNo
phoneNo
organizationNo
job_titleNo
addressNo
birthdayNo
websiteNo
notesNo
nicknameNo

Implementation Reference

  • The MCP tool handler function for 'create_contact', decorated with @mcp.tool(). Constructs contact_data from input parameters and delegates to GoogleContactsService.create_contact().
    @mcp.tool()
    async def create_contact(
        given_name: str,
        family_name: Optional[str] = None,
        email: Optional[str] = None,
        phone: Optional[str] = None,
        organization: Optional[str] = None,
        job_title: Optional[str] = None,
        address: Optional[str] = None,
        birthday: Optional[str] = None,
        website: Optional[str] = None,
        notes: Optional[str] = None,
        nickname: Optional[str] = None,
    ) -> str:
        """Create a new contact with comprehensive field support.
    
        Args:
            given_name: First name of the contact
            family_name: Last name of the contact
            email: Email address of the contact
            phone: Phone number of the contact
            organization: Company/organization name
            job_title: Job title or position
            address: Physical address
            birthday: Birthday in YYYY-MM-DD format
            website: Website URL
            notes: Notes or biography
            nickname: Nickname
        """
        service = init_service()
        if not service:
            return "Error: Google Contacts service is not available. Please check your credentials."
    
        try:
            contact_data = {"given_name": given_name}
    
            # Add optional fields if provided
            if family_name:
                contact_data["family_name"] = family_name
            if email:
                contact_data["email"] = email
            if phone:
                contact_data["phone"] = phone
            if organization:
                contact_data["organization"] = organization
            if job_title:
                contact_data["job_title"] = job_title
            if address:
                contact_data["address"] = address
            if birthday:
                contact_data["birthday"] = birthday
            if website:
                contact_data["website"] = website
            if notes:
                contact_data["notes"] = notes
            if nickname:
                contact_data["nickname"] = nickname
    
            contact = service.create_contact(contact_data)
            return f"Contact created successfully!\n\n{format_contact(contact)}"
        except Exception as e:
            return f"Error: Failed to create contact - {str(e)}"
  • The core implementation in GoogleContactsService that builds the API request body using _build_contact_body and executes people.createContact to create the contact via Google API.
    def create_contact(self, contact_data: Dict[str, Any]) -> Dict[str, Any]:
        """Create a new contact with comprehensive field support.
    
        Args:
            contact_data: Dictionary containing contact information
    
        Returns:
            Created contact dictionary
        """
        try:
            contact_body = self._build_contact_body(contact_data)
    
            person = self.service.people().createContact(body=contact_body).execute()
    
            return self._format_contact_enhanced(person)
    
        except HttpError as error:
            raise GoogleContactsError(f"Error creating contact: {error}")
  • src/main.py:74-74 (registration)
    The call to register_tools(mcp) in main.py, which triggers registration of all tools including create_contact via the decorators in tools.py.
    register_tools(mcp)
  • The register_tools function that orchestrates registration of contact tools, including the create_contact handler.
    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)
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. While 'create' implies a write operation, it doesn't mention permission requirements, whether the operation is idempotent, what happens on duplicate contacts, or what the response format looks like. No rate limits, error conditions, or system constraints are described.

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 well-structured with a clear opening statement followed by detailed parameter documentation. While the parameter list is lengthy, each entry is concise and informative. The opening sentence could be more specific about what 'comprehensive field support' means.

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 11 parameters and no annotations or output schema, the description does a good job with parameter documentation but lacks critical behavioral context. It doesn't explain what happens after creation, what the tool returns, or how to handle errors. The parameter coverage is excellent, but overall completeness is limited by missing operational guidance.

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 description provides excellent parameter semantics with clear explanations for all 11 parameters, including format specifications like 'YYYY-MM-DD' for birthday. With 0% schema description coverage, the description fully compensates by documenting each parameter's purpose and format beyond what the bare schema provides.

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 creates a new contact with comprehensive field support, which is a specific verb+resource combination. However, it doesn't distinguish this from sibling tools like 'create_contact_advanced' or explain how it differs from 'update_contact' for new vs existing contacts.

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 like 'create_contact_advanced' or 'update_contact'. It doesn't mention prerequisites, constraints, or typical use cases beyond the basic creation function.

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