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

Aperta Adatta ai principianti
#12 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
85/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
javascript, node.js
Ambito
tooling

Direzione di ricerca

Inizia da sdk/mcp.mjs e dagli strumenti esistenti mailgate_list_messages e mailgate_wait_for_email; verifica come vengono chiamati i metodi di MailGateClient e come sono strutturate le risposte degli strumenti. Aggiungi lo strumento di lettura tramite ID usando getMessage(...) e verifica i campi restituiti, inclusi gli allegati, in tests/mcp-server.test.mjs. Aggiorna la tabella degli strumenti in sdk/README.md; il lavoro è completato quando i test richiesti e il typecheck passano.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.
Lingua principale
JavaScript
Stelle
0
Fork
3
Merge medio
1h 15m
PR unite (30g)
4

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Dicka18/mailgate

Tutte le issue di Dicka18/mailgate

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.