Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/mcp/tools/core/consult_assistant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,18 @@ export const consult_assistant = tool(
{
name: "consult_assistant",
description:
"Send a question to an AI assistant specifically enhanced to answer Firebase questions.",
"Access an AI assistant specialized in all aspects of **Firebase**. " +
"Use this tool to get **detailed information**, **best practices**, **troubleshooting steps**, **code examples**, and **contextual help** regarding Firebase services, features, and project configuration. " +
"This includes questions about Firestore, Authentication, Cloud Functions, Hosting, Storage, Analytics, and more. " +
"It can also provide insights based on the **current Firebase project context**.",
Comment on lines +10 to +13
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

For improved readability and maintainability, consider using an array of strings joined together instead of direct string concatenation. This approach is often cleaner, less error-prone (e.g., forgetting a trailing space), and makes it easier to manage individual parts of the description.

      [
        "Access an AI assistant specialized in all aspects of **Firebase**.",
        "Use this tool to get **detailed information**, **best practices**, **troubleshooting steps**, **code examples**, and **contextual help** regarding Firebase services, features, and project configuration.",
        "This includes questions about Firestore, Authentication, Cloud Functions, Hosting, Storage, Analytics, and more.",
        "It can also provide insights based on the **current Firebase project context**.",
      ].join(" "),

inputSchema: z.object({
prompt: z
.string()
.describe("A description of what the user is trying to do or learn with Firebase."),
.describe(
"The specific question or task related to Firebase. " +
"Be precise and include relevant details, such as the Firebase service in question, the desired outcome, or any error messages encountered. " +
"Examples: 'What's the best way to deploy a React app to Firebase Hosting?', 'Explain Firebase Authentication with Google Sign-In.' , 'What are the current project settings for 'projectId'? ",
),
Comment on lines +17 to +21
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Similar to the description field, using Array.prototype.join() here can improve readability.

Additionally, this change corrects a minor formatting inconsistency in the list of examples:

  • Removes the extra space after Examples:.
  • Fixes the inconsistent spacing around the comma separating the examples ('Sign-In.' , 'What...).
        .describe(
          [
            "The specific question or task related to Firebase.",
            "Be precise and include relevant details, such as the Firebase service in question, the desired outcome, or any error messages encountered.",
            "Examples: 'What's the best way to deploy a React app to Firebase Hosting?', 'Explain Firebase Authentication with Google Sign-In.', 'What are the current project settings for \'projectId\'?'",
          ].join(" ")
        ),

}),
annotations: {
title: "Consult Firebase Assistant",
Expand Down
Loading