You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(ui): templates called non-existent app.callTool; correct #386 doc claims
The generated form/progress/tree-view/kanban templates emitted
`app.callTool('tool', args)` (positional — no such SDK method) and
`app.sendMessage('<string>')`, both of which throw at runtime, so template
interactivity never worked. Verified against the @modelcontextprotocol/ext-apps
v1.7.4 App.d.ts: the API is `callServerTool({ name, arguments })` and
`sendMessage({ role, content })`; there is no `callTool`.
- lib/ui-templates.sh: 5 callServerTool sites (+.catch on the 3 fire-and-forget
tree/kanban calls to avoid unhandled rejections); 6 sendMessage sites to the
{role, content} object form. Generated JS validated with `node --check`.
- test/unit/ui_templates.bats: per-template assertions — interactive templates
use `app.callServerTool({` and never `app.callTool(`; receive-only templates
(data-table, diff-viewer) make no tool call; sendMessage uses the object form.
- Docs: this breakage was misattributed to "Claude Desktop bug #386". #386 was
closed COMPLETED — the real cause was the same wrong call signature. Corrected
README(.in), docs/concepts/mcp-apps.md, docs/guides/ui-resources.md, and
docs/reference/ui-templates.md (Experimental→Beta for interactive templates,
with an honest "API-correct, not yet host-verified" caveat). The separate
progress-streaming claim is kept as host-dependent/unverified.
685 unit tests pass; test/lint.sh clean; README render up to date.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,7 @@ MCP Apps (SEP-1865) sync with the current ext-apps draft spec.
24
24
25
25
### Fixed
26
26
27
+
-**UI templates called a non-existent SDK method.** The generated `form`, `progress`, `tree-view`, and `kanban` templates emitted `app.callTool('tool', args)` (positional, no such method) and `app.sendMessage('<string>')`, which threw at runtime — so interactivity never worked. Fixed to the correct MCP Apps SDK API: `app.callServerTool({ name, arguments })` (with `.catch` on fire-and-forget calls) and `app.sendMessage({ role, content })`. This breakage had been misattributed to "Claude Desktop bug #386" in the docs; #386 was actually the same incorrect call signature (closed COMPLETED). Docs (`docs/concepts/mcp-apps.md`, `docs/guides/ui-resources.md`, `docs/reference/ui-templates.md`, `README`) corrected accordingly; receive-only templates (`data-table`, `diff-viewer`) were unaffected.
27
28
-**`SPEC-COMPLIANCE.md`** now reports MCP Apps support as introduced in v1.1.0 (was incorrectly labeled 0.8.0).
Copy file name to clipboardExpand all lines: docs/concepts/mcp-apps.md
+7-8Lines changed: 7 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -315,18 +315,17 @@ Need an external-URL or Remote DOM UI for a specific host? Open an issue describ
315
315
316
316
The draft notes that app-delegatedlong-running tool calls **may**use core MCP Tasks (`tasks/*`) so a poll can survive iframe teardown. mcp-bash does **not** implement core MCP Tasks — tools return synchronous results only. App-delegated long-running work is a separate (non-UI) roadmap item; there is currently no UI-specific Tasks behavior to configure.
317
317
318
-
## Known Limitations
319
-
320
-
Current Claude Desktop limitations (as of Jan 2026):
318
+
## Capabilities & caveats
321
319
322
320
| Feature | Status | Notes |
323
321
|---------|--------|-------|
324
-
| Tool result display | ✅ Works | `ontoolresult` receives final result |
325
-
| Real-time progress | ❌ Blocked | `notifications/progress` not forwarded to UIs |
| Interactivity verified in a host | ⚠️ Not yet | mcp-bash emits correct SDK calls; not yet confirmed end-to-end in Claude/ChatGPT |
328
327
329
-
UIs are currently **receive-only** - they can display tool results but cannot initiate requests.
328
+
> **History:** UI-initiated calls were previously documented as "blocked by Claude Desktop bug #386." That was a **misattribution** — [#386](https://github.com/modelcontextprotocol/ext-apps/issues/386) was an incorrect `callServerTool` call signature (positional instead of `{ name, arguments }`), closed *COMPLETED*. mcp-bash's own templates had the same bug (calling a non-existent `app.callTool`), now fixed.
Copy file name to clipboardExpand all lines: docs/guides/ui-resources.md
+4-8Lines changed: 4 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -534,17 +534,13 @@ See `test/unit/ui_*.bats` for examples.
534
534
3. Ensure `app.ontoolresult` handler is set BEFORE calling `app.connect()`
535
535
4. Delete `.registry/tools.json` cache to regenerate tool definitions
536
536
537
-
## Known Limitations
537
+
## Notes & caveats
538
538
539
-
Due to current Claude Desktop implementation limitations:
539
+
- **UI-initiated requests work.** A UI can call server tools and read resources via the MCP Apps SDK: `app.callServerTool({ name, arguments })` and `app.readResource(...)`. (An earlier version of this guide claimed these were "blocked by a Claude Desktop bug" #386 — that was a **misattribution**; #386 was an incorrect `callServerTool` call signature, now closed *COMPLETED*. Use the object form `{ name, arguments }`, not positional arguments.)
540
540
541
-
- **Real-time progress updates**: UIs cannot receive `notifications/progress`during tool execution. The UI only receives `ontoolinput` when the tool starts and `ontoolresult` when it completes.
541
+
- **Real-time progress streaming is host-dependent and unverified here.** UIs reliably receive `ontoolinput` (start) and `ontoolresult` (end); whether `notifications/progress`is forwarded to the UI mid-call depends on the host. If you need progress, show an indeterminate spinner until `ontoolresult`.
542
542
543
-
- **UI-initiated requests**: The MCP Apps SDK methods `callServerTool()` and `resources/read` are blocked by a [Claude Desktop bug](https://github.com/modelcontextprotocol/ext-apps/issues/386). UIs cannot poll for data or call other tools.
544
-
545
-
**Workarounds**:
546
-
- Use indeterminate progress (spinner) while waiting for results
547
-
- For multi-step operations, break into separate tool calls
543
+
- **End-to-end host verification:** mcp-bash emits the correct MCP Apps SDK calls, but interactivity has not been verified inside a host (Claude/ChatGPT) from this repo — treat interactive flows as beta.
|`form`|🧪 Beta|Input forms that submit to a server tool|
14
+
|`progress`|🧪 Beta|Progress indicators with a cancel action|
15
+
|`tree-view`|🧪 Beta| Hierarchical tree; selection calls a server tool|
16
+
|`kanban`|🧪 Beta| Kanban board; card-click / drag-drop call a server tool|
17
17
18
-
### Why are templates experimental?
18
+
### Interactivity status
19
19
20
-
Claude Desktop currently has limitations that prevent full interactivity:
20
+
Interactive templates (`form`, `progress`, `tree-view`, `kanban`) call server tools through the MCP Apps SDK.
21
21
22
-
1.**`callServerTool()`blocked** ([issue #386](https://github.com/modelcontextprotocol/ext-apps/issues/386)): UIs cannot call server tools, so form submission, tree selection, and kanban drag-drop don't work.
22
+
Earlier versions emitted a **non-existent**`app.callTool(...)`method (and `app.sendMessage('<string>')`), which threw at runtime. That breakage was **misattributed** to a Claude Desktop host bug ([#386](https://github.com/modelcontextprotocol/ext-apps/issues/386) — now closed *COMPLETED*; the actual root cause was an incorrect SDK call signature). The templates now use the correct API: `app.callServerTool({ name, arguments })`and `app.sendMessage({ role, content })`.
23
23
24
-
2.**Progress notifications not forwarded**: UIs only receive `ontoolinput` (start) and `ontoolresult` (end) - no real-time progress updates.
24
+
**Why "Beta", not "Ready":** the generated code is now API-correct (verified with `node --check` and unit tests), but interactivity has **not** been verified end-to-end inside a host (Claude/ChatGPT). Receive-only templates (`data-table`, `diff-viewer`) need no tool calls and are Ready.
25
25
26
-
**What works today**: Display-only UIs that render tool results (like `data-table`).
27
-
28
-
**What doesn't work**: Any UI that needs to send data back to the server.
26
+
**Separately (still unverified): real-time progress.** UIs receive `ontoolinput` (start) and `ontoolresult` (end); whether `notifications/progress` is forwarded to UIs mid-call is host-dependent and not confirmed here.
29
27
30
28
## Using Templates
31
29
@@ -47,7 +45,7 @@ When `template` is specified and no `index.html` exists, the template generates
47
45
48
46
## Form Template
49
47
50
-
> ⚠️**Experimental**: Form submission requires `callServerTool()` which is currently blocked by [Claude Desktop bug #386](https://github.com/modelcontextprotocol/ext-apps/issues/386). Forms will render but Submit won't work.
48
+
> 🧪**Beta**: Form submit calls the server tool via `app.callServerTool({ name, arguments })`. The generated code is API-correct (unit-tested), but interactivity is not yet verified end-to-end in a host.
51
49
52
50
Interactive forms that submit to server tools.
53
51
@@ -186,7 +184,7 @@ The table expects tool results in this format:
186
184
187
185
## Progress Template
188
186
189
-
> ⚠️**Experimental**: Real-time progress updates require `notifications/progress`which Claude Desktop does not forward to UIs. This template can only show indeterminate loading states.
187
+
> 🧪**Beta**: The cancel action calls a server tool via `app.callServerTool(...)` (API-correct). Real-time progress *streaming* depends on whether the host forwards `notifications/progress`to UIs mid-call, which is host-dependent and unverified here; the UI reliably receives the final `ontoolresult`.
190
188
191
189
Shows operation progress with optional cancellation.
192
190
@@ -234,7 +232,7 @@ Shows operation progress with optional cancellation.
234
232
235
233
## Diff Viewer Template
236
234
237
-
> ⚠️**Experimental**: Display works but any interactive features (navigation, actions) are blocked by [#386](https://github.com/modelcontextprotocol/ext-apps/issues/386).
235
+
> ✅**Ready**: The diff viewer is receive-only (renders a diff from the tool result); it makes no server tool calls.
238
236
239
237
Two-panel diff view with syntax highlighting.
240
238
@@ -290,7 +288,7 @@ Alternative format:
290
288
291
289
## Tree View Template
292
290
293
-
> ⚠️**Experimental**: Display and expand/collapse work (client-side), but `onSelectTool`is blocked by [#386](https://github.com/modelcontextprotocol/ext-apps/issues/386).
291
+
> 🧪**Beta**: Display and expand/collapse are client-side; node selection calls `onSelectTool`via `app.callServerTool(...)` (API-correct), not yet host-verified end-to-end.
294
292
295
293
Hierarchical tree structure with expand/collapse.
296
294
@@ -355,7 +353,7 @@ Hierarchical tree structure with expand/collapse.
355
353
356
354
## Kanban Template
357
355
358
-
> ⚠️**Experimental**: Display works but `onMoveTool` and `onCardClickTool` are blocked by [#386](https://github.com/modelcontextprotocol/ext-apps/issues/386). Drag-drop will animate but changes won't persist.
356
+
> 🧪**Beta**: Card-click and drag-drop call `onCardClickTool` / `onMoveTool` via `app.callServerTool(...)` (API-correct). Persistence depends on your tool applying the move server-side; not yet host-verified end-to-end.
0 commit comments