Skip to content

Improve formatting of (or suppress)MCP tool responses  #12241

@steren

Description

@steren

What would you like to be added?

By default, Gemini CLI prints the whole output of MCP tools.

Many MCP servers are returning structured JSON payloads.

This results in a not-so-great experience, for example:

Image

I suggest the following:

  • do not print MCP output in primary test color, use gray, to convey to the user they don't need to read it
  • cap the height to 2/3 lines maximum

potentially, we could detect if the output is JSON vs plaintext, and if plaintext, assume the response is relevant to be seen by the user? If Json, we could imagine pretty printing it, or just taking the decision to now show it and always return a nicely Gemini CLI-formatted text response.

Why is this needed?

Make Gemini CLI nicer

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stalearea/coreIssues related to User Interface, OS Support, Core Functionalitypriority/p2Important but can be addressed in a future release.status/need-triageIssues that need to be triaged by the triage automation.
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions