Skip to content

feat(cli): expose /tools desc as explicit subcommand for discoverability - #21241

Merged
cocosheng-g merged 4 commits into
google-gemini:mainfrom
aworki:feat/tools-desc-21214
Mar 9, 2026
Merged

cocosheng-g merged 4 commits into
google-gemini:mainfrom
aworki:feat/tools-desc-21214

Conversation

@aworki

@aworki aworki commented Mar 5, 2026 •

Copy link
Copy Markdown
Contributor

What

Add a visible /tools desc subcommand so users can discover description mode directly in TUI command suggestions/help.

Why

Issue #21214 reports that /tools desc behavior exists but is not clearly visible/discoverable from TUI command UX.

How

  • Introduced desc (alias: descriptions) as an explicit subcommand under /tools.
  • Refactored shared listing logic into a helper to avoid duplication.
  • Kept backward compatibility for arg-based usage (/tools desc and /tools descriptions).
  • Updated /tools command description to point users to /tools desc.

Testing

  • Built required package:
    • npm run build --workspace @google/gemini-cli-core
  • Ran focused tests:
    • npm run test --workspace @google/gemini-cli -- src/ui/commands/toolsCommand.test.ts
  • Result: 5 passed, 0 failed

Checklist

  • Focused single-issue change
  • Tests updated and passing
  • No unrelated files

Closes #21214

@aworki
aworki requested a review from a team as a code owner March 5, 2026 09:18
@google-cla

google-cla Bot commented Mar 5, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly improves the discoverability of the CLI's tool description feature by introducing a dedicated subcommand. This change makes the functionality more visible within the TUI, addressing a reported user experience issue. The implementation also includes refactoring of existing code to enhance maintainability, all while ensuring that previous methods of accessing this feature remain fully functional.

Highlights

  • New Subcommand for Discoverability: Introduced an explicit /tools desc subcommand (with alias /tools descriptions) to enhance the discoverability of the tool description feature directly within the TUI command suggestions and help.
  • Code Refactoring: Refactored the shared logic for listing tools into a dedicated listTools helper function to reduce code duplication and improve maintainability.
  • Backward Compatibility: Maintained backward compatibility for existing argument-based usage (/tools desc and /tools descriptions) alongside the new subcommand.
  • Updated Command Description: Updated the /tools command description to guide users towards the newly introduced /tools desc subcommand for viewing descriptions.
Changelog
  • packages/cli/src/ui/commands/toolsCommand.test.ts
    • Added a new test case to verify the existence and correct functionality of the desc subcommand, ensuring it properly displays tool descriptions.
  • packages/cli/src/ui/commands/toolsCommand.ts
    • Extracted the core logic for listing tools into a new asynchronous listTools helper function, which now accepts a showDescriptions boolean parameter.
    • Defined toolsDescSubCommand, a new SlashCommand object for the desc subcommand, including its name, aliases, description, and action to call listTools with showDescriptions set to true.
    • Integrated toolsDescSubCommand into the toolsCommand's subCommands array.
    • Modified the toolsCommand's description to inform users about the new desc subcommand.
    • Updated the toolsCommand's action to utilize the new listTools helper, preserving backward compatibility for argument-based description display.
Activity
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@gemini-cli gemini-cli Bot added area/core Issues related to User Interface, OS Support, Core Functionality help wanted We will accept PRs from all issues marked as "help wanted". Thanks for your support! labels Mar 5, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request exposes the tool description functionality as an explicit desc subcommand under /tools for better discoverability. The existing logic for listing tools has been refactored into a shared helper function, which is now used by both the new subcommand and the original /tools command action to maintain backward compatibility. A new unit test has been added to cover the new subcommand's functionality. The changes are logical and well-contained. I have reviewed the code and have not found any issues of high or critical severity.

@cocosheng-g cocosheng-g self-assigned this Mar 5, 2026
@cocosheng-g
cocosheng-g enabled auto-merge March 5, 2026 16:33
@cocosheng-g
cocosheng-g added this pull request to the merge queue Mar 6, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Mar 6, 2026
@aworki

aworki commented Mar 9, 2026

Copy link
Copy Markdown
Contributor Author

Just a very light follow-up since this PR already has an approval.

If anything is still needed before merge — a rebase, clarification, or adjusting the command naming to better fit repo conventions — I’m happy to handle it.

@cocosheng-g
cocosheng-g added this pull request to the merge queue Mar 9, 2026
Merged via the queue into google-gemini:main with commit 37ffd60 Mar 9, 2026
27 checks passed
kunal-10-cloud pushed a commit to kunal-10-cloud/gemini-cli that referenced this pull request Mar 12, 2026
…ity (google-gemini#21241)

Co-authored-by: Coco Sheng <cocosheng@google.com>
Co-authored-by: Gaurav <39389231+gsquared94@users.noreply.github.com>
liamhelmer pushed a commit to badal-io/gemini-cli that referenced this pull request Mar 12, 2026
…ity (google-gemini#21241)

Co-authored-by: Coco Sheng <cocosheng@google.com>
Co-authored-by: Gaurav <39389231+gsquared94@users.noreply.github.com>
yashodipmore pushed a commit to yashodipmore/geemi-cli that referenced this pull request Mar 21, 2026
…ity (google-gemini#21241)

Co-authored-by: Coco Sheng <cocosheng@google.com>
Co-authored-by: Gaurav <39389231+gsquared94@users.noreply.github.com>
SUNDRAM07 pushed a commit to SUNDRAM07/gemini-cli that referenced this pull request Mar 30, 2026
…ity (google-gemini#21241)

Co-authored-by: Coco Sheng <cocosheng@google.com>
Co-authored-by: Gaurav <39389231+gsquared94@users.noreply.github.com>
warrenzhu25 pushed a commit to warrenzhu25/gemini-cli that referenced this pull request Apr 9, 2026
…ity (google-gemini#21241)

Co-authored-by: Coco Sheng <cocosheng@google.com>
Co-authored-by: Gaurav <39389231+gsquared94@users.noreply.github.com>
cocosheng-g added a commit that referenced this pull request May 6, 2026
…ity (#21241)

Co-authored-by: Coco Sheng <cocosheng@google.com>
Co-authored-by: Gaurav <39389231+gsquared94@users.noreply.github.com>
@sripasg sripasg added the size/m A medium sized PR label Jun 2, 2026
software-0ficial pushed a commit to software-0ficial/gemini-cli that referenced this pull request Jul 9, 2026
…ity (google-gemini#21241)

Co-authored-by: Coco Sheng <cocosheng@google.com>
Co-authored-by: Gaurav <39389231+gsquared94@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/core Issues related to User Interface, OS Support, Core Functionality help wanted We will accept PRs from all issues marked as "help wanted". Thanks for your support! size/m A medium sized PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

give visibility to /tools desc subcommand

4 participants