Skip to main content
Glama
4tal

MCP Google Contacts Server

by 4tal

delete_contact

Remove a specific contact from Google Contacts by providing its resource name to manage your address book effectively.

Instructions

Delete a contact by resource name.

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
resource_nameYes

Implementation Reference

  • MCP tool handler function for 'delete_contact' decorated with @mcp.tool(). Initializes the GoogleContactsService and delegates to service.delete_contact().
    @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)}"
  • Helper method in GoogleContactsService class that performs the actual Google People API deletion using deleteContact.
    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}")

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