Skip to content

Commit 36b1a2c

Browse files
authored
Init prompt: Improve robustness of getting setup (#9194)
1 parent 5270d3c commit 36b1a2c

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

src/mcp/prompts/core/init.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,22 @@ Follow the steps below taking note of any user instructions provided above.
8383
IMPORTANT: The backend setup guide is for web apps only. If the user requests backend setup for a mobile app (iOS, Android, or Flutter), inform them that this is not supported and do not use the backend setup guide. You can still assist with other requests.
8484
8585
1. If there is no active user, use the \`firebase_login\` tool to help them sign in.
86+
- If you run into issues logging the user in, suggest that they run \`npx firebase-tools login --reauth\` in a separate terminal
8687
2. If there is no active Firebase project, ask the user if they would like to create a project, or use an existing one, and ask them for the project ID
8788
- If they would like to create a project, use the firebase_create_project with the project ID
8889
- If they would like to use an existing project, run the shell command \`firebase use <project-id>\`
89-
3. Initialize the Firebase SDK
90-
- Fetch the active configuration via \`firebase_list_apps\` and then \`firebase_get_sdk_config\`
91-
- If there isn't an app that matches the current platform, use the \`firebase_create_app\` tool to create the app with the appropriate platform, and then run \`firebase_get_sdk_config\`
90+
- If you run into issues creating the firebase project, ask the user to go to the [Firebase Console](http://console.firebase.google.com/) and create a project. Wait for the user to report back before continuing.
91+
3. Ensure there is an active Firebase App for their platform
92+
- Run the \`firebase_list_apps\` tool to list their apps, and find an app that matches their "Workspace platform"
93+
- If there is no app that matches that criteria, use the \`firebase_create_app\` tool to create the app with the appropriate platform
94+
4. Now that we have a working environment, print out 1) Active user 2) Firebase Project and 3) Firebase App & platform they are using for this process.
95+
- Ask the user to confirm this is correct before continuing
96+
5. Initialize the Firebase SDK
97+
- Fetch the configuration for the specified app using the \`firebase_get_sdk_config\` tool.
9298
- Write the Firebase SDK config to a file
9399
- Initialize the Firebase SDK for the appropriate platform
94-
4. Determine which of the services listed below are the best match for the user's needs based on their instructions or by asking them.
95-
5. Read the guide for the appropriate services and follow the instructions. If no guides match the user's need, inform the user.
100+
6. Determine which of the services listed below are the best match for the user's needs based on their instructions or by asking them.
101+
7. Read the guide for the appropriate services and follow the instructions. If no guides match the user's need, inform the user.
96102
97103
## Available Services
98104

0 commit comments

Comments
 (0)