Skip to main content
Glama
ZLeventer

hubspot-mcp

hs_list_members

Retrieve contacts from a specific HubSpot contact list using the list ID. Set an optional limit to control the number of members returned. Supports list analysis and segmentation.

Instructions

Get contacts that are members of a specific list.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
listIdYesHubSpot contact list ID
limitNo

Implementation Reference

  • The `listMembers` function that executes the tool logic. It calls the HubSpot API endpoint `/contacts/v1/lists/{listId}/contacts/all` to retrieve contacts that are members of a specific list.
    export async function listMembers(args: z.infer<typeof ListMembersSchema>) {
      return hubspot(`/contacts/v1/lists/${args.listId}/contacts/all`, "GET", undefined, {
        count: args.limit ?? 25,
        property: "firstname,lastname,email,jobtitle,lifecyclestage",
      });
    }
  • The `ListMembersSchema` Zod schema defining the input parameters: listId (required number) and limit (optional number, min 1, max 100, default 25).
    export const ListMembersSchema = z.object({
      listId: z.number().int().describe("HubSpot contact list ID"),
      limit: z.number().int().min(1).max(100).default(25).optional(),
    });
  • src/index.ts:209-214 (registration)
    Registration of the 'hs_list_members' tool on the MCP server using server.tool(), binding the schema and handler.
    server.tool(
      "hs_list_members",
      "Get contacts that are members of a specific list.",
      ListMembersSchema.shape,
      async (args) => { try { return ok(await listMembers(args)); } catch (e) { return err(e); } },
    );
  • src/index.ts:37-42 (registration)
    Import of ListMembersSchema and listMembers from the lists module into the main server file.
    // Lists
    import {
      ListListsSchema, listLists,
      GetListSchema, getList,
      ListMembersSchema, listMembers,
    } from "./tools/lists.js";
Behavior2/5

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

No annotations exist, so the description must convey behavioral traits. It implies a read-only operation but lacks details on pagination, error states, or rate limits.

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

Conciseness4/5

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

Single sentence, no fluff, but under-specified. Conciseness is good but sacrifices completeness.

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

Completeness2/5

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

No output schema, no explanation of return values, pagination, or error handling. Incomplete for effective use.

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

Parameters1/5

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

Description adds no meaning beyond the input schema. The limit parameter is undocumented in the schema and description. Only listId is briefly explained in the schema.

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 'Get contacts that are members of a specific list,' specifying the action and resource. It differentiates from sibling tools like hs_get_list or hs_list_company_contacts, though it could be more explicit.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives like hs_get_list or hs_search_contacts. No prerequisites, error handling, or context provided.

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

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/ZLeventer/hubspot-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server