Skip to content

[FEATURE]: Color plugin and MCP tool output by language #54957

Open

Description

@Nowaker

Feature hasn't been suggested before.

  • 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.

Activity

  1. opencode-agent commented on Oct 12, 2026

    @opencode-agent
    Contributor

    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.

    Related:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions