send_email cannot send HTML, so a styled briefing has no route #29
Labels
No labels
waiting-on-julian
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jlxq0/jmap-mcp#29
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
send_emailbuilds a text-only email and its schema has no way to say otherwise, so an agent composing a styled briefing has no route.src/mcp.rs:1374:SendEmailParamsatsrc/mcp.rs:883takesfrom,to,cc,bcc,subject,body_text,in_reply_to. The two variants beside it,_with_attachmentsand_with_url_attachment, are about files rather than markup.JMAP carries
htmlBodyand multiplebodyValuesnatively, so this surfaces something the protocol already has rather than adding a mechanism.What to build
An optional
body_htmlonSendEmailParams, defaulting toNone.With it absent, the request must be byte-identical to today's. That is a regression test rather than a claim.
With it present, both bodies go out,
textBodynaming the plain part andhtmlBodynaming the HTML one, distinctpartIds:HTML alone is refused.
body_htmlpresent with an emptybody_textreturnsinvalid_params. A briefing that arrives blank on a client that will not render HTML is worse than an unstyled one, and making that structural beats leaving it to whoever composes.Do not add a new tool
Extend
send_email; do not addsend_html_email. A new tool name is denied by default, and restoring it costs an allowlist entry and a decision that is Julian's.#260merged four hours ago after exactly that took three days and three wrong mounts. The existing grant coverssend_emailwhatever its parameters are.The
read_only_hint = falseannotation stays, sotool-scope.shgenerates the same deny lines and no agent's scope moves.Not in scope
No sanitiser on the outbound HTML. The body is composed by the calling agent and is not external content, which is the distinction
read_email's wrapping already draws. Adding one here would be scope nobody asked for and would corrupt legitimate markup.Acceptance
cargo fmt --check,cargo clippy -- -D warningsandcargo teston the toolchain pinned inci.yml, plus three tests each shown to fail against the unfixed code:body_htmlproduces today's exact objectbodyValues, atextBodyand anhtmlBodyThe real acceptance is a briefing Julian can read on his phone with the styling visible, which is downstream of a release and a deploy and is not this issue.