Add an MCP Apps panel for the triage view #76
Labels
No labels
bug
enhancement
epic
needs-info
needs-triage
ready-for-agent
ready-for-human
svd:go
svd:hold
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dev/mail-mind-mcp#76
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?
Parent: #9 (Phase 4).
An MCP Apps panel for the triage view: a
ui://resource that shows the inbox rows with their class, marks and flag colour, and calls the existing tools. FastMCP 3.4 serves the extension throughfastmcp.apps.AppConfig.Triage Notes
What we've established so far:
What we still need from you (@piers):
Filed under: operator word "resume phase 4 development." sha256:b5be33c704e1
Triage Notes
What we've established so far:
Cursor 1.0.0) and the grok.com custom connector (connectors-manager 0.1.0) both declareio.modelcontextprotocol/ui. Claude web and Claude Desktop render MCP Apps. Claude Code does not. The question "is a panel for Claude clients only worth building" no longer applies.visibility=["app"]and read scope, and returns themail_searchrows as structured JSON. The model never sees it. The existing tools do not change, and the panel parses no pipe text. This replaces "calls the existing tools" in the body.textContent, never as HTML. The resource's CSP allows no outside domains for connections, resources or frames.What we still need from you (@piers):
tools/callreturns.Render probe result, 2026-11-01 04:24 to 04:27 UTC. A throwaway probe, not in this repository, served one
ui://panel (text/html;profile=mcp-app, default CSP), a toolprobe_panellinked to it, and an app-only toolprobe_report(visibility=["app"]) that the panel calls after its handshake.handshake ok: host=grok-web 1.0.0 protocol=2025-11-21, the tool result passed in throughui/notifications/tool-result, andreport to probe (app-only tool) ok: recorded stage=auto.initialize,tools/list,tools/call, with noresources/readand nopanel_report. The Bot replied that its chat does not display the panel. It declares the extension but does not render it.Findings for the build:
ui/initialize, delivered the tool result, and passed the panel'stools/callto an app-only tool on the server.2025-11-21, while the panel asked for2026-01-26. The real panel must accept the version the host returns.Agent Brief
Category: enhancement
Summary: A read-only MCP Apps triage panel: a model-visible tool that opens it and returns useful text alone, an app-only tool that feeds it structured rows, and one
ui://resource.Rulings this brief carries: the triage notes and the render probe result above. Where this brief differs from the issue body, the brief holds.
Current behavior: the triage class, marks and flag colour show only as pipe-text cells in
mail_searchrows. No tool carries_meta.ui, and the server serves noui://resource.Desired behavior:
mail_triage(account=None), read scope, visible to the model and the app, linked to the panel resource.assess: offwhen triage is off.mail_search triage=<class>as the way to list rows in text.mail_triage_rows(account, triage, unread, limit, cursor), read scope,visibility=["app"], so the model does not see it.rowsholdsid,date,from,subject,marks,flag_color,triageandsnippet, plusnext_cursor,moreandtotal.mail_searchfilters it names. Its cuts are those of themail_searchrows: from 40 characters, subject 120, snippet 160.ui://mailmind/triage.html, MIME typetext/html;profile=mcp-app, served from a file in the package.ui/initializehandshake. It accepts any protocol version the host returns: grok.com answers2025-11-21.more, and opens a message by callingmail_read, showing the result as plain text.mail_readoutput) is set only throughtextContent, never throughinnerHTMLor any HTML string.connectDomains,resourceDomains,frameDomainsorbaseUriDomains. It loads nothing from outside.Key interfaces:
SearchParamsgains arolefilter (a mailbox role, such asinbox), honoured byStore.search, so that an inbox works across sources whatever its mailbox name.mail_triagetext.AppConfig(resource_uri=..., visibility=[...])on the tools, andAppConfigon the resource.Acceptance criteria:
tools/listshowsmail_triagewith_meta.ui.resourceUri = ui://mailmind/triage.html, andmail_triage_rowswith_meta.ui.visibility = ["app"].resources/readof the panel returnstext/html;profile=mcp-appwith no CSP domains in its_meta.ui.mail_triagetext gives correct counts per class, for untriaged rows and for unread rows, over the inbox role only. It saysassess: offwhen triage is off.mail_triage_rowsreturns inbox-role rows only, with the fields above, filters by class and unread, and pages with the cursor asmail_searchdoes.innerHTML,outerHTML,insertAdjacentHTML,document.writeoreval, and contains nohttp://orhttps://URL.make checkpasses.Out of scope: