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
| Name | Required | Description | Default |
|---|---|---|---|
| contactId | Yes | Contact ID (UUID from list_contacts or search_contacts) |
Implementation Reference
- lib/carddav.js:332-342 (handler)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 }; }