Claude Desktop strips structuredContent from ui/notifications/tool-result — views built per SDK examples render blank
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- typescript
- Área
- api
Línea de trabajo
Reproduce el problema usando Claude Desktop 1.18286.2 con el resultado de servidor proporcionado y una vista de aplicación que lea structuredContent en ontoolresult. Rastrea la entrega de ui/notifications/tool-result después de tools/call y resources/read; se considera terminado cuando structuredContent llega a la vista según lo especificado, sin requerir duplicación en content.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
Claude Desktop (macOS 1.18286.2, checked 2026-07-07) delivers the ui/notifications/tool-result notification to the app view without the structuredContent field, even when the server's CallToolResult includes it. Every SDK example and pattern reads the view's data from result.structuredContent in ontoolresult, so an app built exactly per the docs mounts, completes the handshake, receives the result, renders nothing, reports ~zero height via auto-resize and is collapsed to an invisible widget. There is no error anywhere: server logs look healthy and the chat just shows no widget.
Environment
- Claude Desktop 1.18286.2, macOS (Darwin 25.5)
@modelcontextprotocol/ext-apps1.7.4,@modelcontextprotocol/sdk1.29.0- Local stdio server, pre-bundled with esbuild; view bundled with vite-plugin-singlefile
- Tool registered via
registerAppToolwith_meta.ui.resourceUri, aninputSchemaand anoutputSchema; resource registered viaregisterAppResourcewithRESOURCE_MIME_TYPE
What the server returns
return {
content: [{ type: "text", text: "…spec as fenced json…" }],
structuredContent: { spec },
_meta: { "weave/spec": spec },
};
tools/list advertises the matching outputSchema (declaring it made no difference, tested both ways).
Evidence
-
Instrumented the view to print its lifecycle into the widget. In Claude Desktop it shows the handshake completing and then:
tool result received but no structuredContent.spec attachedSo the sandbox runs the view,
ui/initializesucceeds, the tool-result notification arrives — withstructuredContentmissing. -
The identical built view under an emulated host (iframe + postMessage, responding to
ui/initializeand then sendingui/notifications/tool-resultwith the fullCallToolResult) renders correctly and reports its size. The app side follows the protocol; the host delivery differs. -
Desktop's MCP server log shows the healthy half:
tools/callreturning normally andresources/readfetching the view HTML. The stripping happens between the host receiving the result and forwarding it to the view. -
A second app on the same machine (single-tool Mermaid viewer built from the SDK examples, verified working end-to-end in Claude Desktop in May 2026) now shows the same symptom for its
structuredContent-dependent path. Its editor still fills viaui/notifications/tool-input, which suggests tool-input is forwarded intact while tool-result is stripped ofstructuredContent.
Expected
Per the spec's data-delivery section, results forwarded to the view include content and optionally structuredContent, with structuredContent/_meta being the channels that do not enter model context. The view should receive structuredContent when the server provided it.
Workaround
Duplicate the payload into the content text (e.g. a fenced JSON block) and parse it in the view when structuredContent is absent. Ugly, but it renders on current Desktop while staying compatible with spec-following hosts.
Possibly related
- #380 (clarifying content vs structuredContent vs
_metavisibility) - #646 (basic-host not forwarding tool-result
_meta)
🤖 Generated with Claude Code
- Lenguaje dominante
- TypeScript
- Estrellas
- 2.9k
- Forks
- 387
- Merge medio
- 3 h 21 min
- PR fusionados (30 d)
- 6
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de modelcontextprotocol/ext-apps
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
modelcontextprotocol/ext-apps#767 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
modelcontextprotocol/ext-apps#742 · 1 comentario ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
modelcontextprotocol/ext-apps#711 ·
-
Spec: Deprecate Sampling Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
modelcontextprotocol/ext-apps#706 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
modelcontextprotocol/ext-apps#703 · 1 reacción ·
Todos los issues de modelcontextprotocol/ext-apps
Issues similares
-
comp/desktop P3 type/bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
NousResearch/hermes-agent#118866 ·
-
Browser Waiting for: Product Owner
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
getsentry/sentry-javascript#24577 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
agilepathway/label-checker#640 ·
-
Plugin stuck at "loading" on DSH 0.1.6-alpha.2 — turnTail list slot registration missing options.id Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
Add 2021 Cup data to website Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
chrisparsons83/flexspotff#153 ·