Mew. Work. Docs

Built-in tools›Preview

Run script

preview_eval
Group
Preview
Turned on by
Its own switch on the Tools page of Conversation settings.
Approval
Reviewed: writes and open-ended actions ask for approval unless the security level or an earlier “Always allow” covers them.
Profile key
tool.preview_eval.description

Runs a JavaScript expression in the conversation's preview page and returns its result as JSON.

The model also uses it to navigate, reload, hover and press keys, since no other tool does those. A returned promise is awaited. Changes it makes to the page last only until the next reload.

When it asks you

Asks at Manual and Accept edits, because the script can do anything the page itself can; Always allow is not offered. If you have been using the page yourself, the pane asks you to give it back. If the page is signed in to a site, Mewrk first asks you to approve the takeover, at every security level. See Browser and preview.

Limits

The call stops waiting for a result after 15 seconds.

Parameters

ParameterTypeDetails
expression required
Expression
stringPromises awaited, no top-level await; result as JSON.
serverId
Server ID
stringServer ID