Skip to main content
Glama
hdmt
by hdmt

get_email

Retrieve detailed information about a specific marketing email from HubSpot using its unique email ID.

Instructions

特定のメールの詳細情報を取得

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailIdYesメールID

Implementation Reference

  • The MCP tool handler for 'get_email' that validates arguments using GetEmailSchema and calls the HubSpotClient.getEmail() method to fetch email details
    case 'get_email': {
      const args = GetEmailSchema.parse(request.params.arguments);
      const result = await this.hubspot.getEmail(args.emailId);
      return {
        content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
      };
    }
  • Zod schema definition for get_email tool input validation, requiring an emailId string parameter
    export const GetEmailSchema = z.object({
      emailId: z.string(),
    });
  • src/server.ts:52-62 (registration)
    Tool registration in the MCP server's tool list, defining the name, description, and input schema for the get_email tool
    {
      name: 'get_email',
      description: '特定のメールの詳細情報を取得',
      inputSchema: {
        type: 'object',
        properties: {
          emailId: { type: 'string', description: 'メールID' },
        },
        required: ['emailId'],
      },
    },
  • The HubSpotClient.getEmail() method that makes the actual API call to HubSpot's marketing/v3/emails endpoint to fetch email details by ID
    async getEmail(emailId: string) {
      return this.request(`/marketing/v3/emails/${emailId}`);
    }

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