Expose error stack traces in list_console_messages (feasibility question)
Is your feature request related to a problem? Please describe.
Today list_console_messages returns plain console text without the error stack trace. When combining logs with LLM-based debugging, the model often can’t determine which file and line actually failed. This forces extra manual steps, guesswork, and back-and-forth context gathering—overall, not an elegant debugging experience.
Describe the solution you'd like
At a high level (no design details): the ability to optionally obtain error stack traces alongside messages returned by list_console_messages. The goal is to let tools/LLMs immediately map an error to the concrete file/function/line so they can provide accurate, actionable fixes.
Describe alternatives you've considered
Manually fetching stacks via separate DevTools/diagnostic calls and correlating them with console messages. This adds complexity, latency, and token cost.
Additional context
This capability would significantly improve automated triage and remediation in MCP-based workflows by enabling precise source localization rather than plain-text analysis.
Open questions for maintainers:
- Does the underlying layer already capture or have access to stacks for error messages?
- If yes, is exposing them in
list_console_messagesfeasible? - If not, are there known technical/security/size constraints or an alternative path we should consider?
Thanks for considering!
Thanks for the FR, we are already working on something similar.