Add mailgate_get_message MCP tool to fetch full body and attachment metadata by ID

Open Beginner friendly
#12 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
85/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript, node.js
Domain
tooling

Research direction

Start with sdk/mcp.mjs and the existing mailgate_list_messages and mailgate_wait_for_email tools; check how MailGateClient methods are called and how tool responses are structured. Add the read-by-ID tool using getMessage(...) and cover the returned fields, including attachments, in tests/mcp-server.test.mjs. Update the tool table in sdk/README.md; done means the requested tests and typecheck pass.

Written by the indexing model from the issue text.

Description

enhancement good first issue help wanted

Context

GET /api/inbox/messages/:id now returns the full sanitized HTML/text body, extracted verification link, and lightweight ttachments metadata ({ filename, mimeType, size }, added in #10).

Currently the MCP server (sdk/mcp.mjs) exposes mailgate_list_messages (summaries only) and mailgate_wait_for_email (polling), but does not expose a direct read-by-ID tool for agents inspecting a specific message returned by mailgate_list_messages.

Proposed Scope

  • Add a mailgate_get_message tool to sdk/mcp.mjs accepting email, messageId, and optional password.
  • Delegate to MailGateClient.getMessage(...) and return structured JSON (subject, sender, otp_code, erification_link, ody_text, ttachments,
    eceived_at).
  • Update ests/mcp-server.test.mjs to cover mailgate_get_message (including ttachments returned in the payload).
  • Update the tool table in sdk/README.md.

Constraints

  • Keep sdk/ at zero runtime dependencies (Node.js >= 18 built-ins only).
  • Run
    pm run typecheck and
    pm test before opening a PR.
Dominant language
JavaScript
Stars
0
Forks
3
Avg merge
1h 15m
Merged PRs (30d)
4

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Dicka18/mailgate

All issues in Dicka18/mailgate

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.