Skip to main content
Glama
adamzaidi

icloud-mcp

by adamzaidi

create_contact

Add new contacts to iCloud Contacts with details like name, phone, email, address, and organization. Manage contact information through structured input for personal or professional use.

Instructions

Create a new contact in iCloud Contacts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
firstNameNoFirst name
lastNameNoLast name
fullNameNoFull display name (overrides firstName + lastName for FN field)
orgNoOrganization / company name
phoneNoPrimary phone number (shorthand for phones array)
emailNoPrimary email address (shorthand for emails array)
phonesNoArray of phone objects: [{ number, type }] where type is cell/home/work/etc.
emailsNoArray of email objects: [{ email, type }] where type is home/work/etc.
addressesNoArray of address objects: [{ street, city, state, zip, country, type }]
birthdayNoBirthday in YYYY-MM-DD format
noteNoNotes / free text
urlNoWebsite URL

Implementation Reference

  • The 'createContact' function in 'lib/carddav.js' implements the creation logic by generating a VCard, assigning a new UUID, and performing a PUT request to the iCloud CardDAV server.
    export async function createContact(fields) {
      const { dataHost, addressBookPath } = await discover();
      const contactId = randomUUID().toUpperCase();
      const vcard = serializeVCard({ ...fields }, contactId);
      const url = `${dataHost}${addressBookPath}${contactId}.vcf`;
    
      const resp = await davRequest('PUT', url, {
        contentType: 'text/vcard; charset=utf-8',
        body: vcard,
      });
    
      if (resp.status !== 201 && resp.status !== 204 && resp.status !== 200) {
        throw new Error(`CardDAV PUT failed: ${resp.status} — ${resp.body.slice(0, 200)}`);
      }
    
      return { created: true, contactId, etag: resp.etag };
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. 'Create' implies a write operation, but description omits duplicate handling, return value (no output schema exists), idempotency, or whether partial failures are possible. Lacks disclosure of iCloud-specific behaviors.

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?

Extremely brief at six words. While not verbose, the extreme brevity contributes to under-specification given the tool's complexity. No filler content, but misses critical context that would earn a 5.

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?

Inadequate for a 12-parameter mutation tool with zero required fields (unusual design) and no output schema. Description fails to explain what constitutes a valid minimal contact or what the operation returns, leaving significant agent uncertainty.

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 100%, so parameters are fully documented in the schema. Description adds no supplemental parameter guidance (e.g., precedence between 'fullName' vs 'firstName+lastName'), warranting the baseline score of 3.

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?

States specific verb 'Create' and resource 'contact' with scope 'iCloud Contacts'. However, it does not explicitly distinguish from sibling tool 'update_contact' (e.g., clarifying this is for new records only).

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?

Provides no guidance on when to use this versus 'update_contact' or 'search_contacts'. Fails to mention the unusual 'all parameters optional' constraint, which is critical for an agent to understand minimum viable input.

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

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