You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Color plugin and MCP tool output by language #54957
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
When generic tool output is shown, a plugin or MCP tool's result is drawn as plain text. Many of them return JSON (a browser automation tool returning {"p": ..., "els": [...]}, GitHub and database MCP servers), which reads as one grey wall. Nothing knows the output's type: a plugin tool returns a string, and an MCP text result carries no content type.
Proposal: a tui.json setting mapping tool names or globs to a language for their output ("browser": "json", "github_*": "json"), plus auto, which colors output that parses as a JSON object or array. Off by default.
Later, a tool could declare its output's content type itself (for example tool({ ..., output: { contentType: "application/json" } }) in the plugin SDK, or an MCP result's mimeType), so the TUI colors it without any config.
This is AI generated, but under direct supervision and on request of @Nowaker.
Thanks for the detailed request! To restate it: you'd like the TUI to syntax-highlight output from plugin and MCP tools, mostly JSON. That could be set per tool (or glob) in tui.json, with an optional auto mode for output that parses as JSON. Later, tools could declare their own content type through the plugin SDK or an MCP result's mimeType.
Right now, tools without their own renderer use the generic view, which draws output as plain text. A TUI plugin can't do this either: the plugin slot tree has no slot for a tool's output. So this would need a change in OpenCode itself, for example a per-tool render slot for plugins and/or a content type on tool results. Maintainers will consider it.
Activity
opencode-agent commentedon Oct 12, 2026
Thanks for the detailed request! To restate it: you'd like the TUI to syntax-highlight output from plugin and MCP tools, mostly JSON. That could be set per tool (or glob) in
tui.json, with an optionalautomode for output that parses as JSON. Later, tools could declare their own content type through the plugin SDK or an MCP result'smimeType.Right now, tools without their own renderer use the generic view, which draws
outputas plain text. A TUI plugin can't do this either: the plugin slot tree has no slot for a tool's output. So this would need a change in OpenCode itself, for example a per-tool render slot for plugins and/or a content type on tool results. Maintainers will consider it.Related:
docs(forklog): record tool output coloring by language