Skip to main content
Glama
adamzaidi

icloud-mcp

by adamzaidi

get_contact

Retrieve detailed contact information from iCloud using a contact ID to access specific person data for email management and communication tasks.

Instructions

Get full details for a specific contact by ID. Use list_contacts or search_contacts to find a contactId.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contactIdYesContact ID (UUID from list_contacts or search_contacts)

Implementation Reference

  • The `getContact` function implements the tool logic by fetching a vCard from the CardDAV server and parsing it.
    export async function getContact(contactId) {
      const { dataHost, addressBookPath } = await discover();
      const url = `${dataHost}${addressBookPath}${contactId}.vcf`;
      const resp = await davRequest('GET', url);
    
      if (resp.status === 404) throw new Error(`Contact not found: ${contactId}`);
      if (resp.status >= 400) throw new Error(`CardDAV GET failed: ${resp.status}`);
    
      const contact = parseVCard(resp.body);
      return { contactId, etag: resp.etag, ...contact };
    }

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/adamzaidi/icloud-mcp'

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