Skip to content

Conversation

mbleigh
Copy link
Contributor

@mbleigh mbleigh commented Sep 20, 2025

  • Adds /firebase:init prompt with placeholder guidance.
  • Resources are defined in src/mcp/resources.
  • Prompts and other output can "link" to resources by saying to use the read_resources tool with a particular URI.

- Adds `/firebase:init` prompt with placeholder guidance.
- Resources are defined in `src/mcp/resources`.
- Prompts and other output can "link" to resources by saying to use the `read_resources` tool with a particular URI.
Copy link
Contributor

@joehan joehan left a comment

Choose a reason for hiding this comment

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

Really like the general idea here! The guides obviously need work, but the dynamic instruction loading is nice.

title: "Firestore Init Guide",
description: "guides the coding agent through configuring Firestore in the current project",
},
async (uri, ctx) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
async (uri, ctx) => {
async (uri,_) => {


export type WorkspacePlatform = "web" | "android" | "ios" | "flutter" | "react-native" | "unity";

export function detectWorkspacePlatform(config: Config): WorkspacePlatform | null {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is super similar to getPlatformFromFolder in src/dataconnect/appFinder.ts. Can we pick one implementation and stick to that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Didn't realize both existed, I'll use that (it should probably get hoisted out of dataconnect but I'll leave that for now.

@mbleigh mbleigh requested a review from joehan September 22, 2025 23:20
Copy link
Contributor

@joehan joehan left a comment

Choose a reason for hiding this comment

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

LGTM and mergable as is, but i think we might wanna consider moving to loading from MDs.

{
uri,
type: "text",
text: `Create ai.ts with import { AI } from "firebase";`,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion from shopping this around to folks on the FDC team - WDYT about moving this content into actual md files and loading it into these files? That would make it very easy for PMs/other folks to write, and it would be simpler to reuse content from cursor rules and other files

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My suggestion is we leave it for now. PMs should be able to manipulate TS files that are primarily just big strings, and it's important to make prompts and resources able to be dynamic. I suspect most prompts will be a combination of a big static hunk of text and some dynamic bits.

If we eventually want to go down this route, I'm going to bring Dotprompt to do the job properly 😄

@mbleigh mbleigh marked this pull request as ready for review September 22, 2025 23:33
@mbleigh mbleigh merged commit 9a5bc4f into master Sep 22, 2025
48 checks passed
@mbleigh mbleigh deleted the mb/mcp/resources branch September 22, 2025 23:52
@github-project-automation github-project-automation bot moved this from Approved [PR] to Done in [Cloud] Extensions + Functions Sep 22, 2025
annajowang pushed a commit that referenced this pull request Sep 26, 2025
- Adds `/firebase:init` prompt with placeholder guidance.
- Resources are defined in `src/mcp/resources`.
- Prompts and other output can "link" to resources by saying to use the `read_resources` tool with a particular URI.
- Consolidates context into a single McpContext type.
- Some additional refactoring and cleanup.
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