Skip to main content
Glama

getContact

Retrieve comprehensive contact details including emails, phone numbers, social links, and notes by inputting a contact ID using Clay's MCP server tools.

Instructions

Get details for a contact by id, including emails, social links, phone numbers, and notes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contact_idYesThe ID of the contact to get details for.

Implementation Reference

  • index.js:187-197 (registration)
    Registration of the MCP tool 'getContact' including name, description, input schema, and execute handler that proxies to external API.
    server.addTool({
      name: "getContact",
      description:
        "Get details for a contact by id, including emails, social links, phone numbers, and notes.",
      parameters: z.object({
        contact_id: z
          .number()
          .describe("The ID of the contact to get details for."),
      }),
      execute: async (params, { session }) => callTool("/get-contact", params, session),
    });
  • Input schema for 'getContact' tool using Zod: requires contact_id as number.
    parameters: z.object({
      contact_id: z
        .number()
        .describe("The ID of the contact to get details for."),
    }),
  • Handler (execute function) for 'getContact' tool: forwards params to external endpoint '/get-contact' via callTool helper.
    execute: async (params, { session }) => callTool("/get-contact", params, session),
  • Utility function used by getContact handler to make authenticated HTTP POST request to Clay's external API.
    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());
    }
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