Skip to main content
Glama
jhw7500

Email MCP Server

by jhw7500

download_attachment

Download email attachments to a specified directory path using email ID and filename parameters.

Instructions

이메일 첨부파일을 지정된 경로에 다운로드합니다.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
email_idYes이메일 ID
filenameYes첨부파일 이름
save_pathNo저장 디렉토리 (기본: /tmp/)

Implementation Reference

  • The handler logic for 'download_attachment', which saves the attachment content to the specified file path.
    case "download_attachment": {
      const saveDir = (args.save_path as string) || tmpdir();
      const safeName = basename(attachment.filename || filename);
      const filePath = join(saveDir, safeName);
      await writeFile(filePath, attachment.content);
      return {
        content: [{
          type: "text" as const,
          text: `다운로드 완료: ${filename} (${(attachment.size / 1024).toFixed(1)}KB)\n경로: ${filePath}`,
        }],
      };
    }
  • Definition and input schema for the 'download_attachment' tool.
    export const attachmentToolDefinitions = [
      {
        name: "download_attachment",
        description: "이메일 첨부파일을 지정된 경로에 다운로드합니다.",
        inputSchema: {
          type: "object" as const,
          properties: {
            email_id: { type: "number", description: "이메일 ID" },
            filename: { type: "string", description: "첨부파일 이름" },
            save_path: { type: "string", description: "저장 디렉토리 (기본: /tmp/)" },
          },
          required: ["email_id", "filename"],
        },
      },

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/jhw7500/email-mcp-server'

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