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
| Name | Required | Description | Default |
|---|---|---|---|
| contact_id | Yes | The ID of the contact to add the note to. | |
| content | Yes | The 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), });
- index.js:244-249 (schema)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."), }),
- index.js:250-250 (handler)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),
- index.js:31-41 (helper)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()); }