Open
Bug 2081630
Opened 1 month ago
Updated 1 month ago
[firefox-devtools-mcp] Improve the output and filters of list_console_messages
Categories
(Developer Infrastructure :: Firefox MCP, enhancement)
Developer Infrastructure
Firefox MCP
Tracking
(Not tracked)
NEW
People
(Reporter: jdescottes, Unassigned)
References
Details
User feedback on list_console_messages. All the changes are in ConsoleEvents (src/firefox/events/console.ts) and in the tool.
- Tab of each message
- Messages do not say which tab they come from.
ConsoleEventsonly storessource.realm, an opaque id shown as[realm]. BiDi already sendssource.contextinlog.entryAdded. - Proposal: store the context, show the tab id on each message, and add a filter for one or more tabs. We could consider showing only the selected tab by default.
- Order
- The buffer keeps up to 1000 messages, and
slice(0, limit)returns the oldest ones. The most recent messages are usually the most useful.list_network_requestsandlist_downloadsalready show the newest first. - Proposal: show the newest messages first.
- Level filter
levelmatches exactly, solevel=warndoes not return errors.- Proposal: treat
levelas a minimum severity.
- Logged objects
console.warn("careful", { level: 2 })shows ascareful Object(1). That is the text summary built by Firefox. The server keeps the serializedargsbut never outputs them, not even withformat=json.- Proposal: render the arguments as compact JSON (for example with
remoteValueToNative), up to a size limit.
- Stack traces
- Uncaught errors show no file or line. BiDi sends
stackTracefor these entries, but the server drops it. - Proposal: show the top frame as
file:line:column, and include the full stack in JSON output.
- Read only new messages
- Only the time-based
sinceMsfilter exists, so an agent cannot reliably continue where its last call stopped. - Proposal: give each message a sequence number, and add an
afterparameter. Bug 2081601 (report new console errors in tool responses) may need the same kind of id.
You need to log in
before you can comment on or make changes to this bug.
Description
•