get_email
Retrieve detailed information about a specific marketing email from HubSpot using its unique email ID.
Instructions
特定のメールの詳細情報を取得
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| emailId | Yes | メールID |
Implementation Reference
- src/server.ts:110-116 (handler)The MCP tool handler for 'get_email' that validates arguments using GetEmailSchema and calls the HubSpotClient.getEmail() method to fetch email detailscase '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) }], }; }
- src/tools/types.ts:9-11 (schema)Zod schema definition for get_email tool input validation, requiring an emailId string parameterexport 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'], }, },
- src/hubspot/client.ts:37-39 (handler)The HubSpotClient.getEmail() method that makes the actual API call to HubSpot's marketing/v3/emails endpoint to fetch email details by IDasync getEmail(emailId: string) { return this.request(`/marketing/v3/emails/${emailId}`); }