Skip to main content
Glama

updateGroup

Modify group details or memberships in Clay's MCP server. Update group titles, add or remove multiple contact IDs in a single operation to streamline group management.

Instructions

Update a group or list. Use this to update the group title and/or modify its members. When adding or removing contacts, provide ALL contact IDs to add/remove in a single call - do not make multiple calls for individual contacts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
add_contact_idsNoA list of contact IDs that should be added to this group. Each ID should be a number representing an existing contact in your network. You can provide multiple IDs to add several contacts at once.
group_idYesThe ID of the group or list to update.
remove_contact_idsNoA list of contact IDs that should be removed from this group. Each ID should be a number representing an existing contact in your network. You can provide multiple IDs to remove several contacts at once.
titleNoThe new name of the group if the user wants to rename it.

Implementation Reference

  • The handler function for the 'updateGroup' tool. It proxies the input parameters to an external API endpoint '/update-group' using the shared callTool helper.
    execute: async (params) => callTool("/update-group", params),
  • Zod input schema for the 'updateGroup' tool defining parameters: group_id (number, required), title (string, optional), add_contact_ids (array of numbers, default []), remove_contact_ids (array of numbers, default []).
    parameters: z.object({ group_id: z.number().describe("The ID of the group or list to update."), title: z .string() .describe("The new name of the group if the user wants to rename it.") .optional(), add_contact_ids: z .array(z.number()) .describe( "A list of contact IDs that should be added to this group. Each ID should be a number representing an existing contact in your network. You can provide multiple IDs to add several contacts at once." ) .default([]), remove_contact_ids: z .array(z.number()) .describe( "A list of contact IDs that should be removed from this group. Each ID should be a number representing an existing contact in your network. You can provide multiple IDs to remove several contacts at once." ) .default([]), }),
  • index.js:275-299 (registration)
    Full registration of the 'updateGroup' MCP tool with FastMCP server, including name, description, input schema, and proxy execute handler.
    server.addTool({ name: "updateGroup", description: "Update a group or list. Use this to update the group title and/or modify its members. When adding or removing contacts, provide ALL contact IDs to add/remove in a single call - do not make multiple calls for individual contacts.", parameters: z.object({ group_id: z.number().describe("The ID of the group or list to update."), title: z .string() .describe("The new name of the group if the user wants to rename it.") .optional(), add_contact_ids: z .array(z.number()) .describe( "A list of contact IDs that should be added to this group. Each ID should be a number representing an existing contact in your network. You can provide multiple IDs to add several contacts at once." ) .default([]), remove_contact_ids: z .array(z.number()) .describe( "A list of contact IDs that should be removed from this group. Each ID should be a number representing an existing contact in your network. You can provide multiple IDs to remove several contacts at once." ) .default([]), }), execute: async (params) => callTool("/update-group", params), });
  • Shared utility function used by all proxy tools, including updateGroup, to make authenticated POST requests to the external Clay API backend.
    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()); }

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