Skip to main content
Glama

createContact

Add new contact records in Clay by providing details like name, email, phone, and LinkedIn handle. Use this endpoint exclusively for creating new contacts, not for adding to groups.

Instructions

Create a new contact record in Clay. This endpoint should only be used when you need to create a completely new contact, not for adding contacts to groups.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
birthdayNoThe birthday of the contact. Use the format YYYY-MM-DD, if no year is specified use 0, month and day are required.
emailNoThe email of the contact.
first_nameNoThe first name of the contact.
last_nameNoThe last name of the contact.
linkedinNoThe LinkedIn handle of the contact.
organizationNoThe organization of the contact.
phoneNoThe phone number of the contact.
titleNoThe job title of the contact.
websiteNoThe website of the contact.

Implementation Reference

  • Handler function for the 'createContact' tool. It proxies the parameters to the external Clay API endpoint '/create-contact' using the shared callTool helper, authenticating with the session's apiKey.
    execute: async (params, { session }) => callTool("/create-contact", params, session),
  • Zod schema defining the input parameters for the createContact tool, including optional fields like names, phone, email, linkedin, etc.
    parameters: z.object({
      first_name: z
        .string()
        .describe("The first name of the contact.")
        .optional(),
      last_name: z.string().describe("The last name of the contact.").optional(),
      phone: z
        .array(z.string())
        .describe("The phone number of the contact.")
        .optional(),
      email: z
        .array(z.string())
        .describe("The email of the contact.")
        .default([]),
      linkedin: z
        .string()
        .describe("The LinkedIn handle of the contact.")
        .optional(),
      website: z
        .array(z.string())
        .describe("The website of the contact.")
        .default([]),
      title: z.string().describe("The job title of the contact.").optional(),
      organization: z
        .string()
        .describe("The organization of the contact.")
        .optional(),
      birthday: z
        .string()
        .describe(
          "The birthday of the contact. Use the format YYYY-MM-DD, if no year is specified use 0, month and day are required."
        )
        .optional(),
    }),
  • index.js:199-238 (registration)
    Registration of the 'createContact' MCP tool with FastMCP server.addTool, including name, description, input schema, and handler.
    server.addTool({
      name: "createContact",
      description:
        "Create a new contact record in Clay. This endpoint should only be used when you need to create a completely new contact, not for adding contacts to groups.",
      parameters: z.object({
        first_name: z
          .string()
          .describe("The first name of the contact.")
          .optional(),
        last_name: z.string().describe("The last name of the contact.").optional(),
        phone: z
          .array(z.string())
          .describe("The phone number of the contact.")
          .optional(),
        email: z
          .array(z.string())
          .describe("The email of the contact.")
          .default([]),
        linkedin: z
          .string()
          .describe("The LinkedIn handle of the contact.")
          .optional(),
        website: z
          .array(z.string())
          .describe("The website of the contact.")
          .default([]),
        title: z.string().describe("The job title of the contact.").optional(),
        organization: z
          .string()
          .describe("The organization of the contact.")
          .optional(),
        birthday: z
          .string()
          .describe(
            "The birthday of the contact. Use the format YYYY-MM-DD, if no year is specified use 0, month and day are required."
          )
          .optional(),
      }),
      execute: async (params, { session }) => callTool("/create-contact", params, session),
    });
  • Shared helper function used by all tools (including createContact) to make authenticated POST requests to the external Clay API endpoints.
    async function callTool(path, params, session) {
      console.log('Calling tool', path, session)
      return fetch(`https://nexum.clay.earth/tools${path}`, {
        body: JSON.stringify(params),
        headers: {
          Authorization: `ApiKey ${session.apiKey}`,
          "Content-Type": "application/json",
        },
        method: "POST",
      }).then((res) => res.text());
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states this is a creation operation, implying mutation, but doesn't mention authentication requirements, rate limits, error handling, or what happens on success/failure. For a mutation tool with zero annotation coverage, this leaves significant gaps in understanding how the tool behaves beyond its basic purpose.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is perfectly concise with two clear sentences that each earn their place. The first sentence states the core purpose, and the second provides important usage guidance. There's zero wasted language or redundancy, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given this is a mutation tool with no annotations and no output schema, the description provides adequate basic context about purpose and usage boundaries. However, it lacks information about what happens after creation (return values, success indicators) and doesn't address behavioral aspects like permissions or side effects, which would be important for a creation operation.

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 the schema already documents all 9 parameters thoroughly. The description adds no parameter-specific information beyond what's in the schema. According to the rules, when schema coverage is high (>80%), the baseline score is 3 even with no param info in the description, which applies here.

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?

The description clearly states the action ('Create a new contact record') and resource ('in Clay'), making the purpose immediately understandable. It distinguishes this tool from sibling tools like 'createGroup' or 'createNote' by specifying it's for contacts. However, it doesn't explicitly differentiate from 'updateGroup' or other contact-related tools beyond the basic scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool ('when you need to create a completely new contact') and when not to use it ('not for adding contacts to groups'). This helps the agent avoid misusing it for group operations. However, it doesn't mention alternatives like 'searchContacts' for finding existing contacts or clarify relationships with other contact tools.

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

Related 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/clay-inc/clay-mcp'

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