Skip to content

[FEATURE]: MCP Tool Output #6604

Closed

Description

@xpcmdshell

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

Description:

MCP tool outputs are not displayed in the TUI. When using any MCP server, you only see the tool name and input parameters, but never the actual output/result. I often times want to see what the tool actually returned. You end up having to rely on manually asking the model to duplicate all the output for you.

Root cause:

GenericTool in packages/opencode/src/cli/cmd/tui/routes/session/index.tsx (lines 1515-1520) ignores props.output:

  function GenericTool(props: ToolProps<any>) {
    return (
      <ToolTitle icon="⚙" fallback="Writing command..." when={true}>
        {props.tool} {input(props.input)}
      </ToolTitle>
    )
  }

Built-in tools like bash and patch render their output, but MCP tools fall back to GenericTool which discards it.

Suggested fix:

Add output rendering to GenericTool, gated by the existing tool_details_visibility setting (or a new config option):

  function GenericTool(props: ToolProps<any>) {
    const { theme } = useTheme()
    return (
      <>
        <ToolTitle icon="⚙" fallback="Writing command..." when={true}>
          {props.tool} {input(props.input)}
        </ToolTitle>
        <Show when={props.output}>
          <box>
            <text fg={theme.text}>{props.output?.trim()}</text>
          </box>
        </Show>
      </>
    )
  }

This follows the same pattern used by the patch tool renderer (lines 1838-1856).

Ideally this would be configurable - either via the existing tool_details keybind toggle, or a separate config option like tui.mcp_tool_output: true/false.

Impact:

Anyone using MCP servers cannot see tool results in the TUI, making it difficult to understand what the model is working with.

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Jan 1, 2026
  2. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Jan 1, 2026
  3. github-actions commented on Jan 1, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if your request has specific requirements not addressed by these issues.

  4. ai-llt commented on Jan 5, 2026

    @ai-llt

    I searched all over but couldn't find the relevant settings, which is very important for us (agent development).

  5. ai-llt commented on Jan 5, 2026

    @ai-llt

    I tried to find the most standard way to write the MCP format, but still couldn't view the return content from other tools.

  6. kostrse commented on Jan 10, 2026

    @kostrse

    Could it be relevant that GitHub MCP get_file_contents only returns "successfully downloaded" without actually returning actual file contents to the model?

  7. yanosh-k commented on Jan 18, 2026

    @yanosh-k
    Contributor

    I think it would be better if the output is collapsible (just like the output of the bash tool). Some tools return long output and it becomes cluttered when output is displayed directly.

    I've tested the following version:

    function GenericTool(props: ToolProps<any>) {
      const { theme } = useTheme()
      const output = createMemo(() => props.output?.trim() ?? "")
      const [expanded, setExpanded] = createSignal(false)
      const lines = createMemo(() => output().split("\n"))
      const maxLines = 3
      const overflow = createMemo(() => lines().length > maxLines)
      const limited = createMemo(() => {
        if (expanded() || !overflow()) return output()
        return [...lines().slice(0, maxLines), "…"].join("\n")
      })
    
      return (
        <Show
          when={props.output}
          fallback={
            <InlineTool icon="⚙" pending="Writing command..." complete={true} part={props.part}>
              {props.tool} {input(props.input)}
            </InlineTool>
          }
        >
          <BlockTool
            title={`# ${props.tool} ${input(props.input)}`}
            part={props.part}
            onClick={overflow() ? () => setExpanded((prev) => !prev) : undefined}
          >
            <box gap={1}>
              <text fg={theme.text}>{limited()}</text>
              <Show when={overflow()}>
                <text fg={theme.textMuted}>{expanded() ? "Click to collapse" : "Click to expand"}</text>
              </Show>
            </box>
          </BlockTool>
        </Show>
      )
    }

    Here is how it looks (websearch-ddgs is a custom tool and tmux_list-session is an MCP tool):

    tool_output_after.mp4
  8. rserbitar commented on Jan 22, 2026

    @rserbitar

    I think it would be better if the output is collapsible (just like the output of the bash tool). Some tools return long output and it becomes cluttered when output is displayed directly.

    Here is how it looks (websearch-ddgs is a custom tool and tmux_list-session is an MCP tool):
    tool_output_after.mp4

    This is great! Absolutley needed!

  9. karta0807913 commented on Jan 26, 2026

    @karta0807913
    Contributor

    I think it would be better if the output is collapsible (just like the output of the bash tool). Some tools return long output and it becomes cluttered when output is displayed directly.

    I've tested the following version:
    Here is how it looks (websearch-ddgs is a custom tool and tmux_list-session is an MCP tool):

    @yanosh-k looks great! maybe you can create a PR about this change and see will they merge it?

  10. rekram1-node commented on Jan 26, 2026

    @rekram1-node
    Contributor

    Yeah that's valid I like it

  11. cuipengfei commented on Feb 1, 2026

    @cuipengfei

    Having a settings option to control how many lines are shown of the mcp tool call output would be great

  12. yanosh-k commented on Feb 3, 2026

    @yanosh-k
    Contributor

    It could check the config for such a setting and set the number of shown lines based on it.

    In the PR I've also added (per Aiden Cline's request) a menu option to toggle the output on and off, so probably the minimum number of lines should be 1, as setting it to 0 would be equivalent to turning the option off.

    So when checking the setting it should be something like const maxLines = Math.max(1, ctx.sync.data.config.tui?.generic_tool_preview_lines).

  13. added a commit that references this issue on Feb 21, 2026
    1bc98ba
  14. quangbilly79 commented on May 20, 2026

    @quangbilly79

    Did you guys freaking fix this? It's May 21st! And you guys just released the Antigravity Chatbot app! I can't use my Power BI-MCP properly with Antigravity because of this bug. Have to switch to Claude Desktop!

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

Metadata

Metadata

Assignees

Labels

discussionUsed for feature requests, proposals, ideas, etc. Open discussionopentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions