Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[Bug]: preview_evaluate forbids WebMCP write tools even when the user explicitly asks for the change

Đang mở Phù hợp với người mới
#26,471 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@shivamhwp đang làm issue này rồi.

Từ ngày 28/10/2026.

  • #26570 của @shivamhwp — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
74/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
ai-infra-agents

Hướng nghiên cứu

Bắt đầu bằng việc đọc chuỗi mô tả preview_evaluate trong apps/server/src/mcp/toolkits/preview/tools.ts, tệp được nêu trong báo cáo, và so sánh nó với mô tả của preview_act anh em. Sau đó đọc ca eval webmcp-charts-saved-to-site-not-inline trong evals/mcp-tool-use/cases/visual-preview.ndjson để xem cách diễn đạt hiện có bảo vệ hành vi nào. Hoàn thành nghĩa là mô tả vẫn cấm dùng các công cụ trang để hiển thị kết quả trong khi vẫn cho phép các thao tác ghi mà người dùng đã yêu cầu rõ ràng, và ca eval liên quan vẫn pass.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug needs-triage
Before submitting
  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.
Area

apps/server

Steps to reproduce
  1. Open a page that exposes WebMCP tools via navigator.modelContext in a preview tab owned by the agent (e.g. a notes app that registers list_notes, create_note, delete_note).
  2. Ask the agent to list the page's tools: it calls navigator.modelContext.getTools() through preview_evaluate and lists them correctly.
  3. Explicitly ask the agent to use one of the write tools (e.g. "create a note titled Groceries").
Expected behavior

When the user explicitly asks for a change, the agent can call the page's write tools through preview_evaluate, the same way it can already drive the same change by clicking through the page UI with preview_act. Pages can already mark their read-only tools with annotations.readOnlyHint, so the agent can tell read tools from write tools.

Actual behavior

The agent refuses. The preview_evaluate description says:

Page tools reached here: read data only, never create, save, or display.

The agent takes this as an absolute rule, so the write tools are unusable even when the user asks for the change directly. The only remaining path is to reproduce the same change by clicking through the UI with preview_act, which is slower and more fragile than calling the tool the page exposes for that purpose.

The sentence was added in #24850 (apps/server/src/mcp/toolkits/preview/[tools.ts](https://github.com/tmp/apps/server/src/mcp/toolkits/preview/tools.ts)). The related eval case webmcp-charts-saved-to-site-not-inline (evals/mcp-tool-use/cases/[visual-preview.ndjson](https://github.com/tmp/evals/mcp-tool-use/cases/visual-preview.ndjson)) covers a narrower failure: the agent saved charts to the site's dashboard when the user wanted inline visuals in T3 Code. "display" covers that case. "create, save" also blocks writes the user explicitly requested.

A possible narrower wording: page tools are for reading unless the user asked for that change on the site; never use them to show results.

Impact

Major degradation or frequent failure

Version or commit

0.1.4-nightly.20261028.3822

Environment

macOS 27.0.1, T3 Code desktop (Nightly), Claude provider (claude-opus-5-5).

Logs or stack traces

Screenshots, recordings, or supporting files

No response

Workaround

Ask the agent to make the change through the page UI with preview_act (click and type, confirming before save).

Ngôn ngữ chính
TypeScript
Star
24.8k
Fork
6.4k
Merge trung bình
3 giờ 20 phút
Pull request đã merge (30 ngày)
208

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của pingdotgg/t3code

Tất cả issue của pingdotgg/t3code

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.