Skip to main content
Glama
hdmt
by hdmt

list_emails

Retrieve marketing emails from HubSpot with options to limit results, apply offsets, and sort by date or name for efficient email management.

Instructions

HubSpotのマーケティングメール一覧を取得

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo取得件数(デフォルト: 20)
offsetNoオフセット(デフォルト: 0)
sortNoソート項目 (name, createdAt, updatedAt, createdBy, updatedBy)。降順は -createdAt のように - を付ける

Implementation Reference

  • The core implementation of listEmails method that constructs the HubSpot API request URL with query parameters (limit, offset, sort) and makes the HTTP GET request to /marketing/v3/emails endpoint
    async listEmails(limit = 20, offset = 0, sort?: string) {
      let url = `/marketing/v3/emails?limit=${limit}&offset=${offset}`;
      if (sort) {
        url += `&sort=${encodeURIComponent(sort)}`;
      }
      return this.request(url);
    }
  • Zod schema definition for list_emails tool input validation, defining optional parameters: limit (default 20), offset (default 0), and sort with Japanese description
    export const ListEmailsSchema = z.object({
      limit: z.number().optional().default(20),
      offset: z.number().optional().default(0),
      sort: z.string().optional().describe('ソート項目 (name, createdAt, updatedAt, createdBy, updatedBy)。降順は -createdAt のように - を付ける'),
    });
  • src/server.ts:41-51 (registration)
    MCP tool registration for list_emails, defining the tool name, description in Japanese, and input schema with properties for limit, offset, and sort parameters
      name: 'list_emails',
      description: 'HubSpotのマーケティングメール一覧を取得',
      inputSchema: {
        type: 'object',
        properties: {
          limit: { type: 'number', description: '取得件数(デフォルト: 20)' },
          offset: { type: 'number', description: 'オフセット(デフォルト: 0)' },
          sort: { type: 'string', description: 'ソート項目 (name, createdAt, updatedAt, createdBy, updatedBy)。降順は -createdAt のように - を付ける' },
        },
      },
    },
  • MCP request handler for list_emails tool that validates input arguments using ListEmailsSchema, calls the HubSpot client's listEmails method, and returns the formatted JSON response
    case 'list_emails': {
      const args = ListEmailsSchema.parse(request.params.arguments);
      const result = await this.hubspot.listEmails(args.limit, args.offset, args.sort);
      return {
        content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
      };
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure but offers minimal information. It states it 'gets' marketing emails but doesn't clarify whether this is a read-only operation, whether it requires specific permissions, what format the returned data takes, or if there are rate limits. For a list operation with zero annotation coverage, this represents a significant transparency gap.

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 extremely concise - a single Japanese sentence that directly states the tool's purpose without any fluff or unnecessary elaboration. Every word serves a functional purpose, making it efficient and front-loaded with the essential information about what the tool does.

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?

For a list operation with no annotations and no output schema, the description is insufficiently complete. While the purpose is clear, there's no information about what the tool returns (email objects, IDs only, metadata), how results are structured, or any behavioral constraints. The agent lacks crucial context needed to properly invoke and interpret results from this tool.

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 description adds no parameter information beyond what's already documented in the schema (which has 100% coverage). All three parameters (limit, offset, sort) are fully described in the input schema with their types, defaults, and format details. The description doesn't provide additional context about how these parameters affect the listing behavior, so it meets the baseline for high schema coverage.

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 action ('取得' - get/fetch) and resource ('HubSpotのマーケティングメール一覧' - HubSpot marketing email list), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_email' (which likely fetches a single email) or 'create_draft_email', leaving room for potential confusion about when to use this list operation versus individual email retrieval.

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?

The description provides no guidance on when to use this tool versus alternatives. There's no mention of when to choose list_emails over get_email (for bulk vs single email retrieval) or create_draft_email. The agent must infer usage context solely from tool names, which is insufficient for optimal tool selection.

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

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