Skip to content

fix(ui): render MCP tool output in GenericTool fallback#22035

Open
Femumme wants to merge 1 commit intoanomalyco:devfrom
Femumme:feat/mcp-tool-output-rendering
Open

fix(ui): render MCP tool output in GenericTool fallback#22035
Femumme wants to merge 1 commit intoanomalyco:devfrom
Femumme:feat/mcp-tool-output-rendering

Conversation

@Femumme
Copy link
Copy Markdown

@Femumme Femumme commented Apr 11, 2026

GenericTool now accepts and renders the output prop using the same data-scrollable pattern as built-in tools, making MCP tool results visible in the web/desktop UI.

Issue for this PR

Closes #15825

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

The GenericTool(the fallback renderer for MCP tools) was a self-closing <BasicTool /> — No output was rendered to the user whatsoever.

That way no user could see what actually was returned from the MCP tools - they had to rely on the LLM to interprete it correctly.

To fix this, I added the output prop. Render it inside BasicTool using the same output as the bash-tool - this wraps the output in a copyable box.

I also tested it using only the Markdown component, which also worked fine, but I found that the bash-output gives it a more polished and consistent look to other tools. If you would like to have the Markdown component instead, let me know and I'll change it.

Using only the Markdown component would make this only a few lines of change, if you prefer to keep the change smaller.

How did you verify your code works?

I started the UI locally using bun dev and let the agent execute a custom MCP tool (kindly-web-search)

Screenshots / recordings

Before:
grafik

After (Collapsed):
grafik

After (Expanded):
grafik

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

GenericTool now accepts and renders the output prop using the same
Show/Markdown/data-scrollable pattern as built-in tools, making MCP
tool results visible in the web/desktop UI.
@github-actions
Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Potential Duplicate Found:

Why it's related: This PR appears to address the same issue - rendering MCP tool output in the GenericTool component. The current PR (#22035) specifically targets the UI aspect in the fallback renderer, while #15865 also aims to render MCP tool output in GenericTool. You should verify if #15865 already addresses this or if there's a different scope/context.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MCP tool output not visible in UI — GenericTool ignores output prop

1 participant