Skip to main content
Glama

createNote

Add a note to a contact by specifying their ID and note content. Simplify communication tracking and information management within Clay's unified platform.

Instructions

Create a note for a contact. Only use this when the user explicitly asks to create, add, or save a note.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contact_idYesThe ID of the contact to add the note to.
contentYesThe content of the note.

Implementation Reference

  • index.js:240-251 (registration)
    Registration of the 'createNote' MCP tool, including name, description, Zod input schema, and inline execute handler that proxies requests to the external Clay API endpoint '/note' via the callTool helper.
    server.addTool({
      name: "createNote",
      description:
        "Create a note for a contact. Only use this when the user explicitly asks to create, add, or save a note.",
      parameters: z.object({
        contact_id: z
          .number()
          .describe("The ID of the contact to add the note to."),
        content: z.string().describe("The content of the note."),
      }),
      execute: async (params, { session }) => callTool("/note", params, session),
    });
  • Zod schema defining input parameters: contact_id (required number) and content (required string).
    parameters: z.object({
      contact_id: z
        .number()
        .describe("The ID of the contact to add the note to."),
      content: z.string().describe("The content of the note."),
    }),
  • The execute handler for the tool, which calls the shared callTool utility to POST the parameters to 'https://nexum.clay.earth/tools/note' with API key authentication.
    execute: async (params, { session }) => callTool("/note", params, session),
  • Shared helper function used by multiple tools (including createNote) to proxy requests to the backend Clay API service.
    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