Skip to content

Add web support for Crashlytics MCP tools and prompts - #10822

Open
tagboola wants to merge 8 commits into
mainfrom
crash-mcp-web-support
Open

Add web support for Crashlytics MCP tools and prompts#10822
tagboola wants to merge 8 commits into
mainfrom
crash-mcp-web-support

Conversation

@tagboola

Copy link
Copy Markdown
Contributor

Description

Add support for web apps with Crashlytics MCP tools and prompts.

Scenarios Tested

Sample Commands

@wiz-9635d3485b

wiz-9635d3485b Bot commented Jul 20, 2026

Copy link
Copy Markdown

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities -
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings 2 Medium 1 Low
Software Management Finding Software Management Findings -
Total 2 Medium 1 Low

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try the Wiz Code extension for VS Code, JetBrains, or Visual Studio.

@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 extends Firebase Crashlytics support to web applications, introducing web-specific reports (topBrowsers and webMetrics), metrics (sessionsCount), and filters (browserFilterDisplayNames). It also updates MCP prompts, guides, tools, and availability checks to distinguish between mobile and web platforms. The reviewer feedback highlights a critical issue in the web Crashlytics detection logic, which incorrectly expects "firebase/crashlytics" in package.json instead of the standard "firebase" or "@firebase/crashlytics" dependencies, and points out a few minor typos in comments and documentation.

Comment thread src/mcp/util/crashlytics/availability.ts Outdated
Comment thread src/mcp/util/crashlytics/availability.spec.ts Outdated
Comment thread src/mcp/resources/guides/crashlytics_reports.ts Outdated
Comment thread src/crashlytics/types.ts Outdated
@tagboola
tagboola requested review from PolinaGo and maxl0rd July 20, 2026 16:26
@tagboola
tagboola requested a review from schnecle July 21, 2026 18:43

@schnecle schnecle 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.

A couple small things

Comment thread src/crashlytics/filters.ts
.array(z.enum(["SIGNAL_EARLY", "SIGNAL_FRESH", "SIGNAL_REGRESSED", "SIGNAL_REPETITIVE"]))
.optional()
.describe(`Counts events matching the given signals`),
.describe(`Counts events matching the given signals. Only supported for mobile apps.`),

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.

This looks like the kind of thing that an agent is really going to mess up. Have you tested this one out locally? It might perform better if you say mobile apps and then qualify it like "mobile apps (e.g. iOS and Android)"

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.

I think this instruction will mostly work. If the api can just discard invalid filters, this is probably fine.

Comment thread src/mcp/util/crashlytics/availability.spec.ts Outdated
Comment thread src/mcp/util/crashlytics/availability.ts Outdated
Comment thread src/mcp/resources/guides/crashlytics_reports.ts Outdated
Comment thread src/crashlytics/types.ts Outdated
Comment thread src/crashlytics/filters.ts
.array(z.enum(["SIGNAL_EARLY", "SIGNAL_FRESH", "SIGNAL_REGRESSED", "SIGNAL_REPETITIVE"]))
.optional()
.describe(`Counts events matching the given signals`),
.describe(`Counts events matching the given signals. Only supported for mobile apps.`),

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.

I think this instruction will mostly work. If the api can just discard invalid filters, this is probably fine.

Comment thread src/crashlytics/types.ts Outdated
Comment thread src/crashlytics/types.ts Outdated
Comment thread src/crashlytics/types.ts Outdated
Comment thread src/crashlytics/types.ts Outdated
return false;
}

const sourceFiles = await detectFiles(appPath, "*.{js,jsx,ts,tsx,mjs,cjs,html,vue,svelte}");

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.

This could be very costly to the MCP start up time on a big app. For the other options, we try to do something that works for most folks and then give the workaround that they can force the crashlytics tools to be there even if not detected. Do we have any conventions around where someone would import the crashlytics dep that we could use to cover that 90% case?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Agreed-- I'm worried about the performance of this as well. @tonybaroneee is there a particular file where we expect most developers to import crashlytics?

I just remembered for the app testing agent that we just do a check to see if the app distribution API is enabled on the project to determine if we expose the app testing agent MCP tools. I wonder if is there an API or onboarding step that we can check to determine if they're onboarded for crash for web. That may be easier than trying to pinpoint a specific file that has a crashlytics import.

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.

Yeah, maybe let's just call a GET to the telemetry admin API config endpoint to see if they've onboarded. That's a pretty strong signal (even though they still might not have provisioned the SDK in their app yet).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated this to just check if the telemetry admin API config exists instead of checking to see if the depedency is declared in the package.json file.

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.

5 participants