gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

[Feature Request] Suppress or control verbose tool output (JSON) in the CLI UI

Open gitenstuff opened this issue 2 months ago • 2 comments

What would you like to be added?

When the AI uses tools that return large structured data (like search_issues or list_files returning JSON), the raw JSON output is printed directly to the chat interface. This "clogs" the screen with pages of text, making it hard to read the AI's actual response.

I would like the CLI to either:

  1. Collapse the output into a UI element that can be expanded if needed.
  2. Provide a setting to toggle tool output verbosity or disable showing tool output entirely (e.g., tools.showOutput: false or similar).

Why is this needed?

Currently, simple queries like "find issues about X" result in massive JSON dumps that scroll critical context off the screen. This degrades the user experience significantly, even when the model provides a concise summary afterwards.

Additional context

The model itself cannot prevent this output from being displayed as it seems to be a function of the CLI's tool execution rendering logic.


Distinction from Related Issues:

I am aware of related issues such as #3904 and #12241, which focus primarily on hiding/suppressing MCP tool responses. This request is distinct and important because:

  1. It applies to ALL tool outputs (e.g., search_issues, list_files, run_shell_command), not just MCP-specific ones, as all can be equally verbose and disruptive.
  2. It prioritizes a UI improvement (collapsible/expandable outputs) as a primary solution, rather than just a binary show/hide setting. This allows the user to maintain context verification and selectively review full output without losing the ability to follow the main conversation flow.
  3. The raw JSON dump from internal tools significantly degrades the scrolling experience in the terminal/UI, making comprehensive solutions beyond simple suppression necessary.

gitenstuff avatar Dec 05 '25 06:12 gitenstuff

I am aware of related issues #3904 and #12241, which focus primarily on hiding/suppressing MCP tool responses.

This request is distinct because:

  1. It applies to ALL tool outputs (e.g., search_issues, list_files, run_shell_command), which can be equally verbose and disruptive.
  2. It prioritizes a UI improvement (collapsible/expandable outputs) rather than just a binary show/hide setting. This allows the user to maintain context verification without losing the ability to read the chat.
  3. The raw JSON dump from internal tools significantly degrades the scrolling experience in the terminal/UI.

gitenstuff avatar Dec 05 '25 06:12 gitenstuff

Important Clarification on Implementation:

The suggestions for collapsing, truncating, or toggling tool output verbosity (points 1 and 2 under "What would you like to be added?") are intended solely for the human-facing user interface and display.

It is essential that the underlying AI Agent / LLM continues to receive the full, unaltered, and verbose tool output in its context window. This ensures the Agent's reasoning capabilities are not degraded by a lack of complete information, even if the user interface presents a more concise view. The goal is to improve human readability without compromising the Agent's performance or access to necessary detail.

gitenstuff avatar Dec 05 '25 07:12 gitenstuff