Skip to main content
Glama
ZLeventer

hubspot-mcp

hs_get_list

Retrieve membership count and list type for a specific HubSpot contact list using its list ID.

Instructions

Get metadata for a specific contact list including membership count and list type.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
listIdYesHubSpot contact list ID

Implementation Reference

  • src/index.ts:37-42 (registration)
    Import of GetListSchema and getList from src/tools/lists.ts, used in tool registration.
    // Lists
    import {
      ListListsSchema, listLists,
      GetListSchema, getList,
      ListMembersSchema, listMembers,
    } from "./tools/lists.js";
  • src/index.ts:202-207 (registration)
    Registration of the 'hs_get_list' tool with the MCP server, linking the schema (GetListSchema.shape) to the handler (getList).
    server.tool(
      "hs_get_list",
      "Get metadata for a specific contact list including membership count and list type.",
      GetListSchema.shape,
      async (args) => { try { return ok(await getList(args)); } catch (e) { return err(e); } },
    );
  • Zod schema for hs_get_list input validation – requires a single parameter 'listId' (number).
    export const GetListSchema = z.object({
      listId: z.number().int().describe("HubSpot contact list ID"),
    });
  • Handler function that executes the tool logic: calls the HubSpot API endpoint /contacts/v1/lists/{listId} to get list metadata.
    export async function getList(args: z.infer<typeof GetListSchema>) {
      return hubspot(`/contacts/v1/lists/${args.listId}`);
    }
Behavior3/5

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

No annotations are provided, so the description carries full burden. It discloses the tool returns membership count and list type, but does not mention behavior on invalid listId, rate limits, or whether it's read-only (likely). The description is sparse but not contradictory.

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?

Single sentence, front-loaded with verb and resource, no superfluous words. Exceptionally concise for the information conveyed.

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

Completeness4/5

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

For a simple read tool with one parameter and no output schema, the description covers the primary return fields (membership count, list type). It could mention the response format but the lack of output schema limits expectations. Slight gap but mostly complete.

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?

The schema covers 100% of parameters with a description 'HubSpot contact list ID'. The description adds 'specific contact list' which aligns but adds no new semantic detail. Baseline 3 is appropriate given high schema coverage.

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

Purpose5/5

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

The description clearly states the verb 'get', the resource 'metadata for a specific contact list', and the included fields 'membership count and list type'. This distinguishes it from sibling tools like hs_list_lists (which likely lists all lists) and hs_list_members (which gets members).

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

Usage Guidelines3/5

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

The description implies usage by describing what the tool does, but it does not explicitly state when to use it versus alternatives like hs_list_lists. No when-to-use or when-not-to-use guidance is provided, though the context is clear enough.

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