Skip to main content
Glama
RayanZaki

MCP Google Contacts Server

by RayanZaki

delete_contact

Remove a specific contact from Google Contacts by providing its resource name. This tool permanently deletes contact information from your Google account.

Instructions

Delete a contact by resource name.

    Args:
        resource_name: Contact resource name (people/*) to delete
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
resource_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The MCP tool handler for 'delete_contact': an async function decorated with @mcp.tool() that initializes the service, calls service.delete_contact(), and returns success/error messages.
    @mcp.tool()
    async def delete_contact(resource_name: str) -> str:
        """Delete a contact by resource name.
        
        Args:
            resource_name: Contact resource name (people/*) to delete
        """
        service = init_service()
        if not service:
            return "Error: Google Contacts service is not available. Please check your credentials."
        
        try:
            result = service.delete_contact(resource_name)
            if result.get('success'):
                return f"Contact {resource_name} deleted successfully."
            else:
                return f"Failed to delete contact: {result.get('message', 'Unknown error')}"
        except Exception as e:
            return f"Error: Failed to delete contact - {str(e)}"
  • Supporting method in GoogleContactsService class that executes the Google People API deleteContact call.
    def delete_contact(self, resource_name: str) -> Dict:
        """Delete a contact by resource name."""
        try:
            self.service.people().deleteContact(
                resourceName=resource_name
            ).execute()
            
            return {'success': True, 'resourceName': resource_name}
        
        except HttpError as error:
            raise GoogleContactsError(f"Error deleting contact: {error}")
  • Invocation of register_tools(mcp) in main.py, which defines and registers the delete_contact tool (along with others) using @mcp.tool() decorators.
    register_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 but only states the action ('Delete') without disclosing critical behavioral traits such as whether deletion is permanent, requires specific permissions, has side effects, or what happens on success/failure. This is inadequate for a destructive operation.

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: one for the purpose and one for the parameter. It's front-loaded with the main action, though the parameter section could be more integrated. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/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, 0% schema coverage, and an output schema (which helps but isn't described), the description is incomplete. It lacks behavioral context, error handling, and usage guidance, making it insufficient for safe agent invocation.

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?

Schema description coverage is 0%, so the description must compensate. It adds the parameter name and clarifies it's a 'Contact resource name (people/*)', providing basic semantics beyond the schema's title. However, it doesn't explain format details or validation rules, leaving gaps.

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 ('Delete') and resource ('a contact'), making the purpose unambiguous. However, it doesn't differentiate from sibling tools like 'update_contact' or 'create_contact' beyond the obvious action difference, missing explicit sibling distinction.

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 like 'update_contact' or 'create_contact', nor any context about prerequisites or exclusions. 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/RayanZaki/mcp-google-contacts-server'

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