Commit 71da398
committed
fix: list_pages should work after selected page is closed
list_pages was defined with definePageTool which marks it as pageScoped.
This causes the handler dispatch in index.ts to call
getSelectedMcpPage() before invoking the handler. When the selected page
has been closed, getSelectedPptrPage() throws an error instead of
returning the page list.
list_pages doesn't actually use the page parameter — its handler only
calls response.setIncludePages(true). Change it to defineTool so it
bypasses the page-scoped check and works regardless of whether a page
is currently selected.
Fixes #11381 parent 57e7d51 commit 71da398
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
0 commit comments