Capture all print/warn/error log output over a window (MUTATES STATE via LogService)
capture-log-outputRecords live Roblox LogService messages into a buffer so you can inspect print, warn, and error output during play, then stop to clear captured state.
Instructions
WRITES LIVE GAME STATE — INSTALLS A PERSISTENT LOG CONNECTION. Connects LogService.MessageOut and records every line the game emits (print, warn, error, and engine messages) into a ring buffer, so you can later read everything that was logged during a window of play. This is the best way to watch a game's own console output over time — see what a script prints when you trigger an action, catch errors/stack traces as they happen, or correlate warnings with behavior. It uses a signal CONNECTION (LogService.MessageOut), NOT a function hook, so it is low-risk compared to the hook-based instrument tools. WORKFLOW (stateful — survives across tool calls via getgenv().__mcp_logCapture): 1. action='start' — connects MessageOut to a handler that pushes { message (first 500 chars), messageType, t } into a 1000-entry ring buffer. Returns { started }. 2. action='fetch' — returns the captured messages (newest-bounded by limit) WITHOUT clearing them; poll while you play. Returns { count, returned, entries }. 3. action='stop' — Disconnects the connection and clears state. Returns { stopped, captured }. CAVEATS: the connection PERSISTS until you stop it (or the client restarts) and fires on every logged line, so a noisy game fills the 1000-entry buffer (oldest dropped). Each message is truncated to 500 chars. Always stop when done. Requires game:GetService('LogService') and getgenv. Returns { error } if a capability is missing, or { notRunning } for fetch/stop when nothing is active. Signature: { action: "start" | "fetch" | "stop", limit: any?, threadContext: number? }. Phase: observe; cost=medium; idempotency=read-only. Requires: active-client. Produces: structured-result. Safety: read-only. On failure: inspect tool-schema for exact fields, defaults, constraints, and an invocation example.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | fetch only: maximum number of messages to return, newest first (default 200, capped at the 1000-entry buffer). | |
| action | Yes | 'start' connects LogService.MessageOut and begins capturing log lines (persistent until stopped); 'fetch' returns captured messages WITHOUT clearing them (poll while you play); 'stop' disconnects and clears all captured state. | |
| threadContext | No | Optional Roblox thread identity for this call; omit it to use the server default. |