Skip to content

Conversation

kevinthecheung
Copy link
Contributor

Description

Scenarios Tested

Sample Commands

Copy link
Contributor

Summary of Changes

Hello @kevinthecheung, 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 enhances the mcp tool by introducing a new command-line option that facilitates the generation of a markdown-formatted list of all available Firebase resources. This feature aims to improve the discoverability and documentation of the various Firebase services and guides, making it easier for developers to understand and utilize them within the system.

Highlights

  • New CLI Option: A new command-line option, --generate-resource-list, has been added to the mcp tool. This option allows users to output a markdown table of all available Firebase resources.
  • Resource Documentation Generation: When invoked, the --generate-resource-list option calls a new function, markdownDocsOfResources, which programmatically compiles and formats a list of all Firebase resources and their descriptions into a markdown table.
  • Updated Documentation: The src/mcp/README.md file has been updated to include a new section that lists and describes the various Firebase resources, providing clear documentation for developers.
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.

Copy link
Contributor

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

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 adds a new --generate-resource-list command-line option to the MCP server, which prints a markdown table of available resources. The implementation follows the pattern of existing generator options. I've provided a few suggestions to improve maintainability and fix a minor typo in the generated documentation.

| crashlytics_update_issue | crashlytics | Use this to update the state of Crashlytics issue. |
| apphosting_fetch_logs | apphosting | Use this to fetch the most recent logs for a specified App Hosting backend. If `buildLogs` is specified, the logs from the build process for the latest build are returned. The most recent logs are listed first. |
| apphosting_list_backends | apphosting | Use this to retrieve a list of App Hosting backends in the current project. An empty list means that there are no backends. The `uri` is the public URL of the backend. A working backend will have a `managed_resources` array that will contain a `run_service` entry. That `run_service.service` is the resource name of the Cloud Run service serving the App Hosting backend. The last segment of that name is the service ID. `domains` is the list of domains that are associated with the backend. They either have type `CUSTOM` or `DEFAULT`. Every backend should have a `DEFAULT` domain. The actual domain that a user would use to conenct to the backend is the last parameter of the domain resource name. If a custom domain is correctly set up, it will have statuses ending in `ACTIVE`. |
| apphosting_list_backends | apphosting | Use this to retrieve a list of App Hosting backends in the current project. An empty list means that there are no backends. The `uri` is the public URL of the backend. A working backend will have a `managed_resources` array that will contain a `run_service` entry. That `run_service.service` is the resource name of the Cloud Run service serving the App Hosting backend. The last segment of that name is the service ID. `domains` is the list of domains that are associated with the backend. They either have type `CUSTOM` or `DEFAULT`. Every backend should have a `DEFAULT` domain. The actual domain that a user would use to conenct to the backend is the last parameter of the domain resource name. If a custom domain is correctly set up, it will have statuses ending in `ACTIVE`. |
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

There's a typo conenct which should be connect. Also, there are multiple spaces between sentences (e.g., ... 'DEFAULT'. Every ...). While markdown collapses most whitespace, it's better to have a single space for source readability and to avoid unintended formatting.

Suggested change
| apphosting_list_backends | apphosting | Use this to retrieve a list of App Hosting backends in the current project. An empty list means that there are no backends. The `uri` is the public URL of the backend. A working backend will have a `managed_resources` array that will contain a `run_service` entry. That `run_service.service` is the resource name of the Cloud Run service serving the App Hosting backend. The last segment of that name is the service ID. `domains` is the list of domains that are associated with the backend. They either have type `CUSTOM` or `DEFAULT`. Every backend should have a `DEFAULT` domain. The actual domain that a user would use to conenct to the backend is the last parameter of the domain resource name. If a custom domain is correctly set up, it will have statuses ending in `ACTIVE`. |
| apphosting_list_backends | apphosting | Use this to retrieve a list of App Hosting backends in the current project. An empty list means that there are no backends. The `uri` is the public URL of the backend. A working backend will have a `managed_resources` array that will contain a `run_service` entry. That `run_service.service` is the resource name of the Cloud Run service serving the App Hosting backend. The last segment of that name is the service ID. `domains` is the list of domains that are associated with the backend. They either have type `CUSTOM` or `DEFAULT`. Every backend should have a `DEFAULT` domain. The actual domain that a user would use to connect to the backend is the last parameter of the domain resource name. If a custom domain is correctly set up, it will have statuses ending in `ACTIVE`. |

Comment on lines +64 to +77
export function markdownDocsOfResources(): string {
const allResources = [...resources, ...resourceTemplates];
const headings = `
| Resource Name | Description |
| ------------- | ----------- |`;
const resourceRows = allResources.map((res) => {
let desc = res.mcp.title ? `${res.mcp.title}: ` : "";
desc += res.mcp.description || "";
desc = desc.replaceAll("\n", "<br>");
return `
| ${res.mcp.name} | ${desc} |`;
});
return headings + resourceRows.join("");
}
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This function can be written more clearly to build the markdown table. Using an array of lines and then joining them with a newline character is a more common and readable pattern than concatenating strings with embedded newlines.

export function markdownDocsOfResources(): string {
  const allResources = [...resources, ...resourceTemplates];
  const header = [
    "| Resource Name | Description |".
    "| ------------- | ----------- |",
  ];
  const resourceRows = allResources.map((res) => {
    let desc = res.mcp.title ? `${res.mcp.title}: ` : "";
    desc += res.mcp.description || "";
    desc = desc.replaceAll("\n", "<br>");
    return `| ${res.mcp.name} | ${desc} |`;
  });
  return [...header, ...resourceRows].join("\n");
}

@kevinthecheung kevinthecheung merged commit 376dc89 into master Oct 6, 2025
48 checks passed
@kevinthecheung kevinthecheung deleted the kc-mcp-resources branch October 6, 2025 18:12
@github-project-automation github-project-automation bot moved this from Approved [PR] to Done in [Cloud] Extensions + Functions Oct 6, 2025
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.

2 participants