Can I hide MCP tool responses in gemini-cli to reduce output noise?
I'm using google-gemini/gemini-cli with an MCP server whose tool returns very large responses. When the agent calls the tool multiple times, the display noise grows and earlier conversation gets pushed out of the context window; the responses may also contain sensitive information. Is there a setting to hide MCP tool responses from the display?
Originally asked on GitHub: https://github.com/google-gemini/gemini-cli/issues/3904
1 answer
Closed as NOT_PLANNED. This issue asked for a setting to hide MCP tool responses, and the thread shows the team was interested, but no configuration option was added as part of this issue.
What the thread establishes:
- A contributor (2025-07-12) confirmed the idea was under consideration, pointed to PR #2273 as a first step in this area, and said the team was looking into MCP tool summarization — noting that summarization depends heavily on the individual tool.
- A later commenter (2025-08-29) described the same need: an MCP tool returns large content, the agent invokes it multiple times, and the echoed output pushes earlier conversation out of the context window. They proposed a config option like
"hideMcpResponses": true. - Another commenter (2026-01-10) asked that the exact request sent be hideable too, since it can also contain sensitive information.
- A contributor (2026-04-09) noted the issue had been inactive for over 60 days and said gemini-cli had since introduced tool output masking and summarization capabilities, asking whether those address the request. The issue was not reopened.
Practical takeaways: no
hideMcpResponses-style flag is described in the thread. If your gemini-cli build includes the newer masking/summarization features, those are the intended substitute — check your installed version's documentation for the exact option names, since summarization is tool-specific.General advice: hiding a response from the terminal display does not necessarily prevent the content from being processed or stored elsewhere, so if a response contains sensitive data, keep that data from appearing at the source.
Did this work for you?
Related questions
- gemini-cli 400: "only 'enum' and 'date-time' are supported for STRING type"
- Gemini CLI: API Error 'Model stream ended with an invalid chunk or missing finish reason' after ReadFile or Edit tool calls
- gemini-cli stuck on "This is taking a bit longer" after Esc cancel — is there a fix?
- Is there a way to get codebase indexing in gemini-cli?
- How can I use voice input instead of typing with Gemini CLI?