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());
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly indicates this is a mutation tool ('Update'), which implies it modifies data. It adds useful context about batch operations for contacts, warning against multiple calls. However, it lacks details on permissions needed, error handling (e.g., invalid IDs), rate limits, or whether changes are reversible. For a mutation tool with zero annotation coverage, this leaves gaps in behavioral understanding.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded: it starts with the core purpose, then adds a critical usage guideline. Both sentences earn their place by providing essential information without redundancy. No wasted words or unnecessary details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (mutation with 4 parameters), no annotations, and no output schema, the description is moderately complete. It covers the purpose and a key behavioral guideline but misses details like response format, error cases, or prerequisites. For a mutation tool, more context would be helpful, but it's adequate as a minimum viable description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all parameters (group_id, title, add_contact_ids, remove_contact_ids). The description adds minimal value beyond the schema, only implying that title and members can be updated. It doesn't provide additional semantics like format examples or constraints not in the schema. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Update a group or list' with specific actions 'update the group title and/or modify its members.' It distinguishes from siblings like createGroup (creation vs. update) and getGroups (read vs. update). However, it doesn't explicitly contrast with all possible alternatives like modifyGroup if such existed.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear usage guidance: 'When adding or removing contacts, provide ALL contact IDs to add/remove in a single call - do not make multiple calls for individual contacts.' This is explicit about how to use the tool effectively. However, it doesn't specify when to use this tool versus alternatives like createGroup for new groups or getGroups for viewing, nor does it mention prerequisites like needing an existing group_id.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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