Skip to main content
Glama

create_contact

Create a new contact record for domain registrations by providing required details like name, email, phone, and address information.

Instructions

Create a new contact record for use with domain registrations. Required fields: name, email, phone_num, address1, city, state, zip_code, country.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesContact full name
emailYesContact email address
phone_numYesPhone number with country code (e.g., '+1.5551234567')
address1YesStreet address line 1
address2NoStreet address line 2
cityYesCity
stateYesState or province
zip_codeYesPostal/ZIP code
countryYesCountry code (e.g., 'US', 'KR')
organizationNoOrganization name
fax_numNoFax number

Implementation Reference

  • Registration and MCP handler for the 'create_contact' tool.
    server.tool(
      "create_contact",
      "Create a new contact record for use with domain registrations. " +
        "Required fields: name, email, phone_num, address1, city, state, " +
        "zip_code, country.",
      {
        name: z.string().describe("Contact full name"),
        email: z.string().describe("Contact email address"),
        phone_num: z.string().describe("Phone number with country code (e.g., '+1.5551234567')"),
        address1: z.string().describe("Street address line 1"),
        address2: z.string().optional().describe("Street address line 2"),
        city: z.string().describe("City"),
        state: z.string().describe("State or province"),
        zip_code: z.string().describe("Postal/ZIP code"),
        country: z.string().describe("Country code (e.g., 'US', 'KR')"),
        organization: z.string().optional().describe("Organization name"),
        fax_num: z.string().optional().describe("Fax number"),
      },
      async ({ name, email, phone_num, address1, address2, city, state, zip_code, country, organization, fax_num }) => {
        try {
          const fields: Record<string, string> = {
            name,
            email,
            phone_num,
            address1,
            city,
            state,
            zip_code,
            country,
          };
          if (address2) fields.address2 = address2;
          if (organization) fields.organization = organization;
          if (fax_num) fields.fax_num = fax_num;
    
          const result = await client.createContact(fields);
          return {
            content: [
              { type: "text" as const, text: JSON.stringify(result, null, 2) },
            ],
          };
        } catch (error) {
          const msg = error instanceof Error ? error.message : String(error);
          return {
            content: [
              { type: "text" as const, text: `Failed to create contact: ${msg}` },
            ],
            isError: true,
          };
        }
      }
    );
  • Service method in DynadotClient that invokes the Dynadot API 'create_contact' command.
    async createContact(fields: Record<string, string>): Promise<DynadotResponse> {
      return this.call("create_contact", fields);
    }

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/mikusnuz/dynadot-mcp'

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