Skip to main content
Glama

getGroups

Retrieve all user groups or lists with a customizable limit for better organization and access to contacts across platforms like email, social media, and messaging apps.

Instructions

Get all groups or lists for the user.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoThe maximum number of groups to return.

Implementation Reference

  • Handler/execute function for the getGroups tool, which proxies the call to the external /get-groups endpoint using the callTool helper.
    execute: async (params) => callTool("/get-groups", params),
  • Input schema for getGroups tool using Zod, defining optional 'limit' parameter.
    parameters: z.object({ limit: z .number() .describe("The maximum number of groups to return.") .optional(), }),
  • index.js:253-263 (registration)
    Registration of the getGroups MCP tool via FastMCP server.addTool.
    server.addTool({ name: "getGroups", description: "Get all groups or lists for the user.", parameters: z.object({ limit: z .number() .describe("The maximum number of groups to return.") .optional(), }), execute: async (params) => callTool("/get-groups", params), });
  • Helper function used by getGroups (and other tools) to proxy requests to the external Clay API at nexum.clay.earth.
    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