Docs

Built-in tools›Preview

Server logs

preview_logs
Group
Preview
Turned on by
Its own switch on the Tools page of Conversation settings.
Approval
Not reviewed: runs without asking, within the limits on this page.
Profile key
tool.preview_logs.description

Reads what a dev server printed to stdout and stderr, so the model can check build errors and server behaviour.

Without a serverId it reads the first server that is running or starting. The page's browser console is a separate tool, preview_console_logs.

Limits

  • Mework keeps the last 1,000 chunks of output per server, in the pieces they arrived in, and lines counts these chunks rather than text lines.
  • The output is discarded when the server stops. If a server fails at start, its output is in the preview_start result.

Good to know

  • level: "error" keeps only stderr output that contains error, exception, failed or fatal. Errors a server prints to stdout show up only through search, which is case-sensitive.

Parameters

ParameterTypeDetails
level
Level
stringFilter by level: 'all' (default) shows all output, 'error' shows only lines containing error/exception/failed/fatal
"all" "error"
lines
Line limit
numberMax lines to return (default: 50)
search
Text filter
stringFilter to lines containing this text (e.g., '[DEBUG]', 'POST /api')
serverId
Server ID
stringServer ID: the server's name in .mework/launch.json, numbered (e.g. dev-2) when the file repeats that name

Edit this page on GitHub