Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta Adatta ai principianti
#26,471 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@shivamhwp ci sta già lavorando.

Dal 28/10/2026.

  • #26570 di @shivamhwp — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
74/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript

Direzione di ricerca

Inizia leggendo la stringa di descrizione preview_evaluate in apps/server/src/mcp/toolkits/preview/tools.ts, il file indicato nel report, e confrontala con la descrizione del fratello preview_act. Poi leggi il caso di eval webmcp-charts-saved-to-site-not-inline in evals/mcp-tool-use/cases/visual-preview.ndjson per vedere quale comportamento protegge la formulazione esistente. Fatto significa che la descrizione continua a vietare l'uso degli strumenti di pagina per mostrare risultati mentre consente le scritture che l'utente ha richiesto esplicitamente, e che il caso di eval correlato continua a passare.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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).

Lingua principale
TypeScript
Stelle
24.8k
Fork
6.4k
Merge medio
3h 21m
PR unite (30g)
297

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di pingdotgg/t3code

Tutte le issue di pingdotgg/t3code

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.