Skip to main content
Glama
ZLeventer

hubspot-mcp

hs_list_email_campaigns

List HubSpot marketing email campaigns sorted by most recently updated. Specify the number of campaigns to return and an offset for pagination.

Instructions

List marketing email campaigns ordered by most recently updated.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
offsetNo

Implementation Reference

  • Zod schema for hs_list_email_campaigns: validates optional limit (1-100, default 25) and optional offset (default 0).
    export const ListEmailCampaignsSchema = z.object({
      limit: z.number().int().min(1).max(100).default(25).optional(),
      offset: z.number().int().default(0).optional(),
    });
  • Handler function 'listEmailCampaigns' that calls HubSpot API GET /marketing-emails/v1/emails with limit, offset, orderBy=-updated, and selected properties.
    export async function listEmailCampaigns(args: z.infer<typeof ListEmailCampaignsSchema>) {
      return hubspot("/marketing-emails/v1/emails", "GET", undefined, {
        limit: args.limit ?? 25,
        offset: args.offset ?? 0,
        orderBy: "-updated",
        property: "id,name,subject,currentState,updatedAt,publishedAt,stats",
      });
    }
  • src/index.ts:44-49 (registration)
    Import of ListEmailCampaignsSchema and listEmailCampaigns from src/tools/emails.ts.
    // Emails
    import {
      ListEmailCampaignsSchema, listEmailCampaigns,
      GetEmailCampaignStatsSchema, getEmailCampaignStats,
      ListMarketingEmailsSchema, listMarketingEmails,
    } from "./tools/emails.js";
  • src/index.ts:218-223 (registration)
    Registration of the tool 'hs_list_email_campaigns' via server.tool() with description, schema, and handler callback.
    server.tool(
      "hs_list_email_campaigns",
      "List marketing email campaigns ordered by most recently updated.",
      ListEmailCampaignsSchema.shape,
      async (args) => { try { return ok(await listEmailCampaigns(args)); } catch (e) { return err(e); } },
    );
Behavior2/5

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

No annotations provided, so description bears full burden. Does not state read-only nature, pagination behavior, or rate limits. Only notes ordering by recent update.

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?

One sentence, front-loaded with verb and resource. No wasted words.

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?

With no output schema and no parameter details, description omits what data is returned per campaign. For a list tool with pagination, more detail on response structure is needed.

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?

Schema has 0% description coverage for two parameters (limit, offset). Description adds no parameter information, leaving agent to infer meaning from names alone.

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?

Description clearly states it lists marketing email campaigns with ordering by most recently updated. Differentiates from sibling hs_list_marketing_emails through ordering specificity, but could clarify distinction further.

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 vs alternatives like hs_list_marketing_emails or hs_get_email_campaign_stats. Missing context on preferred scenarios or filtering.

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