createGroup
Create a new group or list in the Clay MCP server, ensuring no duplicates unless specified. Manage contacts, notes, and reminders efficiently with organized groupings.
Instructions
Create a group or list for the user. If a group with the same name already exists, it will not create a duplicate unless explicitly requested to ignore the check.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | The name of the group to create. |
Implementation Reference
- index.js:265-273 (registration)Registration of the MCP tool 'createGroup' using server.addTool, including name, description, input parameters schema, and execute handler.server.addTool({ name: "createGroup", description: "Create a group or list for the user. If a group with the same name already exists, it will not create a duplicate unless explicitly requested to ignore the check.", parameters: z.object({ title: z.string().describe("The name of the group to create."), }), execute: async (params) => callTool("/create-group", params), });
- index.js:269-271 (schema)Input schema for the createGroup tool, requiring a 'title' string parameter.parameters: z.object({ title: z.string().describe("The name of the group to create."), }),
- index.js:272-272 (handler)Handler function for createGroup tool that proxies the request to the external /create-group endpoint via the shared callTool function.execute: async (params) => callTool("/create-group", params),
- index.js:31-41 (helper)Shared helper function callTool that handles HTTP requests to the external Clay API endpoints for all proxied tools, including createGroup.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()); }