firebase-tools 15.28.2 → 15.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/lib/api.js +4 -2
  2. package/lib/apphosting/config.js +10 -8
  3. package/lib/apphosting/localbuilds.js +8 -0
  4. package/lib/apphosting/yaml.js +27 -0
  5. package/lib/bin/cli.js +1 -1
  6. package/lib/bin/mcp.js +8 -3
  7. package/lib/commands/ext-export.js +34 -13
  8. package/lib/commands/ext-migrate.js +3 -0
  9. package/lib/commands/functions-delete.js +6 -67
  10. package/lib/commands/functions-kits-install.js +7 -0
  11. package/lib/commands/functions-kits-uninstall.js +7 -71
  12. package/lib/crashlytics/onboarding.js +23 -2
  13. package/lib/deploy/apphosting/deploy.js +2 -1
  14. package/lib/deploy/apphosting/prepare.js +12 -3
  15. package/lib/deploy/apphosting/release.js +3 -0
  16. package/lib/deploy/apphosting/util.js +3 -1
  17. package/lib/deploy/extensions/secrets.js +10 -0
  18. package/lib/deploy/functions/delete.js +80 -0
  19. package/lib/emulator/types.js +3 -1
  20. package/lib/extensions/askUserForParam.js +9 -8
  21. package/lib/extensions/export.js +46 -9
  22. package/lib/extensions/extensionsHelper.js +28 -0
  23. package/lib/extensions/migrate.js +121 -2
  24. package/lib/extensions/paramHelper.js +78 -25
  25. package/lib/extensions/secretsUtils.js +3 -0
  26. package/lib/extensions/updateHelper.js +3 -1
  27. package/lib/functions/kits/install.js +319 -69
  28. package/lib/gcp/apikeys.js +89 -0
  29. package/lib/gcp/storage.js +3 -2
  30. package/lib/logger.js +83 -9
  31. package/lib/mcp/tools/apphosting/fetch_logs.js +1 -0
  32. package/lib/mcp/tools/apphosting/list_backends.js +1 -0
  33. package/lib/mcp/tools/apptesting/tests.js +2 -0
  34. package/lib/mcp/tools/auth/get_users.js +1 -0
  35. package/lib/mcp/tools/auth/set_sms_region_policy.js +1 -0
  36. package/lib/mcp/tools/auth/update_user.js +1 -0
  37. package/lib/mcp/tools/core/create_android_sha.js +1 -0
  38. package/lib/mcp/tools/core/create_app.js +1 -0
  39. package/lib/mcp/tools/core/create_project.js +1 -0
  40. package/lib/mcp/tools/core/deploy.js +1 -0
  41. package/lib/mcp/tools/core/deploy_status.js +1 -0
  42. package/lib/mcp/tools/core/get_environment.js +1 -0
  43. package/lib/mcp/tools/core/get_project.js +1 -0
  44. package/lib/mcp/tools/core/get_sdk_config.js +1 -0
  45. package/lib/mcp/tools/core/get_security_rules.js +1 -0
  46. package/lib/mcp/tools/core/init.js +1 -0
  47. package/lib/mcp/tools/core/list_apps.js +1 -0
  48. package/lib/mcp/tools/core/list_projects.js +1 -0
  49. package/lib/mcp/tools/core/login.js +1 -0
  50. package/lib/mcp/tools/core/logout.js +1 -0
  51. package/lib/mcp/tools/core/read_resources.js +1 -0
  52. package/lib/mcp/tools/core/update_environment.js +1 -0
  53. package/lib/mcp/tools/core/validate_security_rules.js +1 -0
  54. package/lib/mcp/tools/crashlytics/events.js +2 -0
  55. package/lib/mcp/tools/crashlytics/issues.js +2 -0
  56. package/lib/mcp/tools/crashlytics/notes.js +3 -0
  57. package/lib/mcp/tools/crashlytics/reports.js +1 -0
  58. package/lib/mcp/tools/dataconnect/compile.js +1 -0
  59. package/lib/mcp/tools/dataconnect/execute.js +1 -0
  60. package/lib/mcp/tools/dataconnect/list_services.js +1 -0
  61. package/lib/mcp/tools/firestore/query_collection.js +1 -0
  62. package/lib/mcp/tools/functions/get_logs.js +1 -0
  63. package/lib/mcp/tools/functions/list_functions.js +1 -0
  64. package/lib/mcp/tools/index.js +3 -1
  65. package/lib/mcp/tools/messaging/send_message.js +1 -0
  66. package/lib/mcp/tools/realtime_database/get_data.js +1 -0
  67. package/lib/mcp/tools/realtime_database/set_data.js +1 -0
  68. package/lib/mcp/tools/remoteconfig/get_template.js +1 -0
  69. package/lib/mcp/tools/remoteconfig/update_template.js +1 -0
  70. package/lib/mcp/tools/storage/get_download_url.js +1 -0
  71. package/lib/prompt.js +10 -1
  72. package/lib/tsconfig.compile.tsbuildinfo +1 -1
  73. package/lib/tsconfig.publish.tsbuildinfo +1 -1
  74. package/package.json +1 -1
  75. package/templates/init/functions/typescript/index-kit-migration.ts +20 -2
  76. package/templates/init/functions/typescript/package-kit.json +21 -0
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateAppApiKeyRestriction = updateAppApiKeyRestriction;
4
+ const api_1 = require("../api");
5
+ const apiv2_1 = require("../apiv2");
6
+ const error_1 = require("../error");
7
+ const operation_poller_1 = require("../operation-poller");
8
+ const API_VERSION = "v2";
9
+ const CREDENTIALS_CONSOLE_URL = "https://console.cloud.google.com/apis/credentials";
10
+ const client = new apiv2_1.Client({
11
+ urlPrefix: (0, api_1.apiKeysOrigin)(),
12
+ auth: true,
13
+ apiVersion: API_VERSION,
14
+ });
15
+ async function updateAppApiKeyRestriction(options) {
16
+ const { apiKey, service } = options;
17
+ const keyResourceName = await lookupKeyResourceName(apiKey);
18
+ const key = await getKey(keyResourceName);
19
+ await ensureServiceInKeyRestrictions(key, service);
20
+ }
21
+ async function lookupKeyResourceName(apiKeyString) {
22
+ try {
23
+ const res = await client.get("/keys:lookupKey", {
24
+ queryParams: { keyString: apiKeyString },
25
+ });
26
+ return res.body.name;
27
+ }
28
+ catch (err) {
29
+ if ((0, error_1.getErrStatus)(err) === 403) {
30
+ throw new error_1.FirebaseError(`Permission denied when looking up API key.\n\n` +
31
+ `To resolve this, ensure your account has the right permissions on the project in the Google Cloud Console:\n\n` +
32
+ ` ${CREDENTIALS_CONSOLE_URL}`, { original: err instanceof Error ? err : undefined, status: 403 });
33
+ }
34
+ throw err;
35
+ }
36
+ }
37
+ async function getKey(keyResourceName) {
38
+ try {
39
+ const res = await client.get(keyResourceName);
40
+ return res.body;
41
+ }
42
+ catch (err) {
43
+ if ((0, error_1.getErrStatus)(err) === 403) {
44
+ throw new error_1.FirebaseError(`Permission denied when retrieving API key ${keyResourceName}.\n\n` +
45
+ `To resolve this, ensure your account has the right permissions on the project in the Google Cloud Console:\n\n` +
46
+ ` ${CREDENTIALS_CONSOLE_URL}`, { original: err instanceof Error ? err : undefined, status: 403 });
47
+ }
48
+ throw err;
49
+ }
50
+ }
51
+ async function ensureServiceInKeyRestrictions(key, service) {
52
+ if (!key.restrictions?.apiTargets || key.restrictions.apiTargets.length === 0) {
53
+ return;
54
+ }
55
+ const alreadyAllowed = key.restrictions.apiTargets.some((target) => target.service === service);
56
+ if (alreadyAllowed) {
57
+ return;
58
+ }
59
+ const updatedRestrictions = {
60
+ ...key.restrictions,
61
+ apiTargets: [...key.restrictions.apiTargets, { service }],
62
+ };
63
+ await updateKeyRestrictions({
64
+ ...key,
65
+ restrictions: updatedRestrictions,
66
+ });
67
+ }
68
+ async function updateKeyRestrictions(key) {
69
+ const queryParams = { updateMask: "restrictions" };
70
+ try {
71
+ const res = await client.patch(key.name, key, {
72
+ queryParams,
73
+ });
74
+ await (0, operation_poller_1.pollOperation)({
75
+ apiOrigin: (0, api_1.apiKeysOrigin)(),
76
+ apiVersion: API_VERSION,
77
+ operationResourceName: res.body.name,
78
+ });
79
+ }
80
+ catch (err) {
81
+ if ((0, error_1.getErrStatus)(err) === 403) {
82
+ const keyIdentifier = key.displayName ? `${key.displayName} (${key.name})` : key.name;
83
+ throw new error_1.FirebaseError(`Permission denied when updating API key ${keyIdentifier}.\n\n` +
84
+ `To resolve this, ensure your account has the right permissions on the project in the Google Cloud Console:\n\n` +
85
+ ` ${CREDENTIALS_CONSOLE_URL}`, { original: err instanceof Error ? err : undefined, status: 403 });
86
+ }
87
+ throw err;
88
+ }
89
+ }
@@ -72,7 +72,7 @@ async function upload(source, uploadUrl, extraHeaders, ignoreQuotaProject) {
72
72
  generation: res.response.headers.get("x-goog-generation"),
73
73
  };
74
74
  }
75
- async function uploadObject(source, bucketName, contentType) {
75
+ async function uploadObject(source, bucketName, contentType, maxSizeBytes) {
76
76
  switch (contentType) {
77
77
  case ContentType.TAR:
78
78
  if (!source.file.endsWith(".tar.gz")) {
@@ -86,12 +86,13 @@ async function uploadObject(source, bucketName, contentType) {
86
86
  }
87
87
  const localAPIClient = new apiv2_1.Client({ urlPrefix: (0, api_1.storageOrigin)() });
88
88
  const location = `/${bucketName}/${path.basename(source.file)}`;
89
+ const rangeHeader = maxSizeBytes !== undefined ? `0,${maxSizeBytes}` : "0,123289600";
89
90
  const res = await localAPIClient.request({
90
91
  method: "PUT",
91
92
  path: location,
92
93
  headers: {
93
94
  "Content-Type": contentType === ContentType.TAR ? "application/octet-stream" : "application/zip",
94
- "x-goog-content-length-range": "0,123289600",
95
+ "x-goog-content-length-range": rangeHeader,
95
96
  },
96
97
  body: source.stream,
97
98
  });
package/lib/logger.js CHANGED
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.logger = exports.vsceLogEmitter = void 0;
4
+ exports.resolveLogTarget = resolveLogTarget;
4
5
  exports.findAvailableLogFile = findAvailableLogFile;
5
6
  exports.tryStringify = tryStringify;
6
7
  exports.useFileLogger = useFileLogger;
@@ -8,6 +9,7 @@ exports.useConsoleLoggers = useConsoleLoggers;
8
9
  const winston = require("winston");
9
10
  const events_1 = require("events");
10
11
  const path = require("path");
12
+ const os = require("os");
11
13
  const fs = require("fs");
12
14
  const triple_beam_1 = require("triple-beam");
13
15
  const util_1 = require("util");
@@ -53,25 +55,97 @@ function maybeUseVSCodeLogger(logger) {
53
55
  logger.log = vsceLogger;
54
56
  return logger;
55
57
  }
56
- function findAvailableLogFile() {
57
- const candidates = ["firebase-debug.log"];
58
+ function resolveLogTarget(customPath) {
59
+ const debugPath = customPath ?? process.env.FIREBASE_DEBUG_PATH;
60
+ if (!debugPath || !debugPath.trim()) {
61
+ return {
62
+ baseDir: process.cwd(),
63
+ baseName: "firebase-debug",
64
+ ext: ".log",
65
+ };
66
+ }
67
+ let trimmed = debugPath.trim();
68
+ if (trimmed === "~" || trimmed.startsWith("~/") || trimmed.startsWith("~\\")) {
69
+ trimmed = path.join(os.homedir(), trimmed.slice(1));
70
+ }
71
+ const resolvedPath = path.resolve(process.cwd(), trimmed);
72
+ if (fs.existsSync(resolvedPath)) {
73
+ let isDir = false;
74
+ try {
75
+ isDir = fs.statSync(resolvedPath).isDirectory();
76
+ }
77
+ catch {
78
+ }
79
+ if (isDir) {
80
+ return {
81
+ baseDir: resolvedPath,
82
+ baseName: "firebase-debug",
83
+ ext: ".log",
84
+ };
85
+ }
86
+ const ext = path.extname(resolvedPath);
87
+ return {
88
+ baseDir: path.dirname(resolvedPath),
89
+ baseName: path.basename(resolvedPath, ext),
90
+ ext,
91
+ };
92
+ }
93
+ if (trimmed.endsWith(path.sep) || trimmed.endsWith("/") || trimmed.endsWith("\\")) {
94
+ return {
95
+ baseDir: resolvedPath,
96
+ baseName: "firebase-debug",
97
+ ext: ".log",
98
+ };
99
+ }
100
+ const ext = path.extname(resolvedPath);
101
+ if (ext) {
102
+ return {
103
+ baseDir: path.dirname(resolvedPath),
104
+ baseName: path.basename(resolvedPath, ext),
105
+ ext,
106
+ };
107
+ }
108
+ return {
109
+ baseDir: resolvedPath,
110
+ baseName: "firebase-debug",
111
+ ext: ".log",
112
+ };
113
+ }
114
+ function findAvailableLogFile(customPath) {
115
+ const { baseDir, baseName, ext } = resolveLogTarget(customPath);
116
+ if (!fs.existsSync(baseDir)) {
117
+ try {
118
+ fs.mkdirSync(baseDir, { recursive: true });
119
+ }
120
+ catch {
121
+ }
122
+ }
123
+ const candidates = [`${baseName}${ext}`];
58
124
  for (let i = 1; i < 10; i++) {
59
- candidates.push(`firebase-debug.${i}.log`);
125
+ candidates.push(`${baseName}.${i}${ext}`);
60
126
  }
61
127
  for (const c of candidates) {
62
- const logFilename = path.join(process.cwd(), c);
128
+ const logFilename = path.join(baseDir, c);
63
129
  try {
64
130
  const fd = fs.openSync(logFilename, "r+");
65
131
  fs.closeSync(fd);
66
132
  return logFilename;
67
133
  }
68
- catch (e) {
69
- if (e.code === "ENOENT") {
70
- return logFilename;
134
+ catch (err) {
135
+ if (typeof err === "object" &&
136
+ err !== null &&
137
+ "code" in err &&
138
+ err.code === "ENOENT") {
139
+ try {
140
+ fs.accessSync(baseDir, fs.constants.W_OK);
141
+ return logFilename;
142
+ }
143
+ catch {
144
+ }
71
145
  }
72
146
  }
73
147
  }
74
- throw new Error("Unable to obtain permissions for firebase-debug.log");
148
+ throw new Error(`Unable to obtain permissions for ${baseName}${ext}`);
75
149
  }
76
150
  function tryStringify(value) {
77
151
  if (typeof value === "string") {
@@ -92,7 +166,7 @@ rawLogger.add(new winston.transports.Console({
92
166
  rawLogger.exitOnError = false;
93
167
  exports.logger = maybeUseVSCodeLogger(annotateDebugLines(expandErrors(rawLogger)));
94
168
  function useFileLogger(logFile) {
95
- const logFileName = logFile ?? findAvailableLogFile();
169
+ const logFileName = findAvailableLogFile(logFile);
96
170
  exports.logger.add(new winston.transports.File({
97
171
  level: "debug",
98
172
  filename: logFileName,
@@ -12,6 +12,7 @@ const cloudlogging_1 = require("../../../gcp/cloudlogging");
12
12
  exports.fetch_logs = (0, tool_1.tool)("apphosting", {
13
13
  name: "fetch_logs",
14
14
  description: "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.",
15
+ humanReadableDescription: "Fetch recent service or build logs for an App Hosting backend.",
15
16
  inputSchema: zod_1.z.object({
16
17
  buildLogs: zod_1.z
17
18
  .boolean()
@@ -15,6 +15,7 @@ exports.list_backends = (0, tool_1.tool)("apphosting", {
15
15
  " Every backend should have a `DEFAULT` domain. " +
16
16
  " The actual domain that a user would use to connect to the backend is the last parameter of the domain resource name. " +
17
17
  " If a custom domain is correctly set up, it will have statuses ending in `ACTIVE`.",
18
+ humanReadableDescription: "List App Hosting backends, traffic configurations, and custom domains in your project.",
18
19
  inputSchema: zod_1.z.object({
19
20
  location: zod_1.z
20
21
  .string()
@@ -41,6 +41,7 @@ const defaultDevices = [
41
41
  exports.run_tests = (0, tool_1.tool)("apptesting", {
42
42
  name: "run_test",
43
43
  description: `Run a remote test.`,
44
+ humanReadableDescription: "Run an automated test case on a remote Android or iOS device via Firebase App Distribution.",
44
45
  inputSchema: zod_1.z.object({
45
46
  appId: filters_1.ApplicationIdSchema,
46
47
  releaseBinaryFile: zod_1.z.string().describe("Path to the binary release (APK)."),
@@ -66,6 +67,7 @@ exports.run_tests = (0, tool_1.tool)("apptesting", {
66
67
  exports.check_status = (0, tool_1.tool)("apptesting", {
67
68
  name: "check_status",
68
69
  description: "Check the status of an apptesting release test and/or get available devices that can be used for automated tests ",
70
+ humanReadableDescription: "Check the status of an automated release test or list available test devices.",
69
71
  inputSchema: zod_1.z.object({
70
72
  release_test_name: zod_1.z
71
73
  .string()
@@ -8,6 +8,7 @@ const auth_1 = require("../../../gcp/auth");
8
8
  exports.get_users = (0, tool_1.tool)("auth", {
9
9
  name: "get_users",
10
10
  description: "Use this to retrieve one or more Firebase Auth users based on a list of UIDs or a list of emails.",
11
+ humanReadableDescription: "Retrieve Firebase Auth users by UID, email, phone number, or list all users.",
11
12
  inputSchema: zod_1.z.object({
12
13
  uids: zod_1.z.array(zod_1.z.string()).optional().describe("A list of user UIDs to retrieve."),
13
14
  emails: zod_1.z.array(zod_1.z.string()).optional().describe("A list of user emails to retrieve."),
@@ -8,6 +8,7 @@ const auth_1 = require("../../../gcp/auth");
8
8
  exports.set_sms_region_policy = (0, tool_1.tool)("auth", {
9
9
  name: "set_sms_region_policy",
10
10
  description: "Use this to set an SMS region policy for Firebase Authentication to restrict the regions which can receive text messages based on an ALLOW or DENY list of country codes. This policy will override any existing policies when set.",
11
+ humanReadableDescription: "Set an SMS region policy allowing or denying specific country codes for Firebase Authentication.",
11
12
  inputSchema: zod_1.z.object({
12
13
  policy_type: zod_1.z
13
14
  .enum(["ALLOW", "DENY"])
@@ -8,6 +8,7 @@ const auth_1 = require("../../../gcp/auth");
8
8
  exports.update_user = (0, tool_1.tool)("auth", {
9
9
  name: "update_user",
10
10
  description: "Use this to disable, enable, or set a custom claim on a specific user's account.",
11
+ humanReadableDescription: "Update a user's account by enabling/disabling it or setting custom claims.",
11
12
  inputSchema: zod_1.z.object({
12
13
  uid: zod_1.z.string().describe("the UID of the user to update"),
13
14
  disabled: zod_1.z.boolean().optional().describe("true disables the user, false enables the user"),
@@ -17,6 +17,7 @@ function getCertHashType(shaHash) {
17
17
  exports.create_android_sha = (0, tool_1.tool)("core", {
18
18
  name: "create_android_sha",
19
19
  description: "Use this to add the specified SHA certificate hash to the specified Firebase Android App.",
20
+ humanReadableDescription: "Add a SHA-1 or SHA-256 certificate hash to an Android app in the active Firebase project.",
20
21
  inputSchema: zod_1.z.object({
21
22
  app_id: zod_1.z.string().describe("The Android app ID to add the SHA certificate to."),
22
23
  sha_hash: zod_1.z.string().describe("The SHA certificate hash to add (SHA-1 or SHA-256)."),
@@ -10,6 +10,7 @@ const CREATE_APP_OUTUT_SUFFIX = "\n\nTo fetch the SDK configuration for this app
10
10
  exports.create_app = (0, tool_1.tool)("core", {
11
11
  name: "create_app",
12
12
  description: "Use this to create a new Firebase App in the currently active Firebase Project. Firebase Apps can be iOS, Android, or Web.",
13
+ humanReadableDescription: "Create a new iOS, Android, or Web app in the active Firebase project.",
13
14
  inputSchema: zod_1.z.object({
14
15
  display_name: zod_1.z
15
16
  .string()
@@ -20,6 +20,7 @@ async function checkCloudProject(projectId) {
20
20
  exports.create_project = (0, tool_1.tool)("core", {
21
21
  name: "create_project",
22
22
  description: "Use this to create a new Firebase Project.",
23
+ humanReadableDescription: "Create a new Firebase project or enable Firebase services on an existing Google Cloud project.",
23
24
  inputSchema: zod_1.z.object({
24
25
  project_id: zod_1.z.string().describe("The project ID to create or use."),
25
26
  display_name: zod_1.z
@@ -21,6 +21,7 @@ const TARGETS = {
21
21
  exports.deploy = (0, tool_1.tool)("core", {
22
22
  name: "deploy",
23
23
  description: "Deploy resources to your Firebase project, based on the contents of firebase.json.",
24
+ humanReadableDescription: "Deploy Firebase services and resources configured in firebase.json to your project.",
24
25
  inputSchema: zod_1.z.object({
25
26
  only: zod_1.z
26
27
  .string()
@@ -8,6 +8,7 @@ const jobs_1 = require("../../util/jobs");
8
8
  exports.deploy_status = (0, tool_1.tool)("core", {
9
9
  name: "deploy_status",
10
10
  description: "Check the status of a background deployment job using its Job ID.",
11
+ humanReadableDescription: "Check the status and progress of a background deployment job.",
11
12
  inputSchema: zod_1.z.object({
12
13
  jobId: zod_1.z.string().describe("The Job ID returned by the deploy tool"),
13
14
  }),
@@ -56,6 +56,7 @@ Confirm with the user before taking action.`}`;
56
56
  exports.get_environment = (0, tool_1.tool)("core", {
57
57
  name: "get_environment",
58
58
  description: "Use this to retrieve the current Firebase **environment** configuration for the Firebase CLI and Firebase MCP server, including current authenticated user, project directory, active Firebase Project, and more. All tools require the user to be authenticated, but not all information is required for all tools. Pay attention to the tool requirements for which pieces of information are required.",
59
+ humanReadableDescription: "Retrieve the current Firebase CLI and MCP environment configuration, active project, and authenticated user.",
59
60
  inputSchema: zod_1.z.object({}),
60
61
  annotations: {
61
62
  title: "Get Firebase Environment Info",
@@ -8,6 +8,7 @@ const util_1 = require("../../util");
8
8
  exports.get_project = (0, tool_1.tool)("core", {
9
9
  name: "get_project",
10
10
  description: "Use this to retrieve information about the currently active Firebase Project.",
11
+ humanReadableDescription: "Retrieve metadata and configuration details for the currently active Firebase project.",
11
12
  inputSchema: zod_1.z.object({}),
12
13
  annotations: {
13
14
  title: "Get Current Firebase Project",
@@ -9,6 +9,7 @@ exports.get_sdk_config = (0, tool_1.tool)("core", {
9
9
  name: "get_sdk_config",
10
10
  description: "Use this to retrieve the Firebase configuration information for a Firebase App. " +
11
11
  "You must specify EITHER a platform OR the Firebase App ID for a Firebase App registered in the currently active Firebase Project.",
12
+ humanReadableDescription: "Retrieve SDK configuration details or config file contents for a registered Firebase app.",
12
13
  inputSchema: zod_1.z.object({
13
14
  platform: zod_1.z
14
15
  .enum(["ios", "android", "web"])
@@ -12,6 +12,7 @@ exports.get_security_rules = (0, tool_1.tool)("core", {
12
12
  name: "get_security_rules",
13
13
  description: "Use this to retrieve the security rules for a specified Firebase service. " +
14
14
  "If there are multiple instances of that service in the product, the rules for the default instance are returned.",
15
+ humanReadableDescription: "Retrieve the active security rules for Firestore, Storage, or Realtime Database.",
15
16
  inputSchema: zod_1.z.object({
16
17
  type: zod_1.z.enum(["firestore", "rtdb", "storage"]).describe("The service to get rules for."),
17
18
  }),
@@ -16,6 +16,7 @@ exports.init = (0, tool_1.tool)("core", {
16
16
  description: "Use this to initialize selected Firebase services in the workspace (Cloud Firestore database, Firebase SQL Connect, Firebase Realtime Database, Firebase AI Logic). All services are optional; specify only the products you want to set up. " +
17
17
  "You can initialize new features into an existing project directory, but re-initializing an existing feature may overwrite configuration. " +
18
18
  "To deploy the initialized features, run the `firebase deploy` command after `firebase_init` tool.",
19
+ humanReadableDescription: "Initialize and configure Firebase services in your local project workspace.",
19
20
  inputSchema: zod_1.z.object({
20
21
  features: zod_1.z.object({
21
22
  database: zod_1.z
@@ -8,6 +8,7 @@ const apps_1 = require("../../../management/apps");
8
8
  exports.list_apps = (0, tool_1.tool)("core", {
9
9
  name: "list_apps",
10
10
  description: "Use this to retrieve a list of the Firebase Apps registered in the currently active Firebase project. Firebase Apps can be iOS, Android, or Web.",
11
+ humanReadableDescription: "List all Firebase apps registered in the active project.",
11
12
  inputSchema: zod_1.z.object({
12
13
  platform: zod_1.z
13
14
  .enum(["ios", "android", "web", "all"])
@@ -9,6 +9,7 @@ const PROJECT_LIST_PAGE_SIZE = 20;
9
9
  exports.list_projects = (0, tool_1.tool)("core", {
10
10
  name: "list_projects",
11
11
  description: "Use this to retrieve a list of Firebase Projects that the signed-in user has access to.",
12
+ humanReadableDescription: "List Firebase projects accessible by the authenticated user.",
12
13
  inputSchema: zod_1.z.object({
13
14
  page_size: zod_1.z
14
15
  .number()
@@ -54,6 +54,7 @@ exports.login = (0, tool_1.tool)("core", {
54
54
  }
55
55
  \`\`\`
56
56
  `,
57
+ humanReadableDescription: "Sign the user into the Firebase CLI and MCP server or check current authentication status.",
57
58
  inputSchema: LoginInputSchema,
58
59
  _meta: {
59
60
  requiresAuth: false,
@@ -9,6 +9,7 @@ const logger_1 = require("../../../logger");
9
9
  exports.logout = (0, tool_1.tool)("core", {
10
10
  name: "logout",
11
11
  description: "Use this to sign the user out of the Firebase CLI and Firebase MCP server.",
12
+ humanReadableDescription: "Sign the user out of the Firebase CLI and MCP server.",
12
13
  inputSchema: zod_1.z.object({
13
14
  email: zod_1.z
14
15
  .string()
@@ -9,6 +9,7 @@ const track_1 = require("../../../track");
9
9
  exports.read_resources = (0, tool_1.tool)("core", {
10
10
  name: "read_resources",
11
11
  description: "Use this to read the contents of `firebase://` resources or list available resources",
12
+ humanReadableDescription: "Read the contents of internal firebase:// documentation resources or list all available resources.",
12
13
  annotations: {
13
14
  title: "Read Firebase Resources",
14
15
  destructiveHint: false,
@@ -10,6 +10,7 @@ const node_fs_1 = require("node:fs");
10
10
  exports.update_environment = (0, tool_1.tool)("core", {
11
11
  name: "update_environment",
12
12
  description: "Use this to update environment config for the Firebase CLI and Firebase MCP server, such as project directory, active project, active user account, accept terms of service, and more. Use `firebase_get_environment` to see the currently configured environment.",
13
+ humanReadableDescription: "Update environment settings such as project directory, active project, or active user account.",
13
14
  inputSchema: zod_1.z.object({
14
15
  project_dir: zod_1.z
15
16
  .string()
@@ -45,6 +45,7 @@ function formatRulesetIssues(issues, rulesSource) {
45
45
  exports.validate_security_rules = (0, tool_1.tool)("core", {
46
46
  name: "validate_security_rules",
47
47
  description: "Use this to check Firebase Security Rules for Firestore, Storage, or Realtime Database for syntax and validation errors.",
48
+ humanReadableDescription: "Validate syntax and check for errors in Firestore, Storage, or Realtime Database security rules.",
48
49
  inputSchema: zod_1.z.object({
49
50
  type: zod_1.z.enum(["firestore", "storage", "rtdb"]),
50
51
  source: zod_1.z
@@ -98,6 +98,7 @@ exports.list_events = (0, tool_1.tool)("crashlytics", {
98
98
  description: `Use this to list the most recent events matching the given filters.
99
99
  Can be used to fetch sample crashes and exceptions for an issue,
100
100
  which will include stack traces and other data useful for debugging.`,
101
+ humanReadableDescription: "List recent crash and exception events matching specified filters for an issue.",
101
102
  inputSchema: zod_1.z.object({
102
103
  appId: filters_1.ApplicationIdSchema,
103
104
  filter: filters_1.EventFilterSchema,
@@ -138,6 +139,7 @@ exports.batch_get_events = (0, tool_1.tool)("crashlytics", {
138
139
  description: `Gets specific events by resource name.
139
140
  Can be used to fetch sample crashes and exceptions for an issue,
140
141
  which will include stack traces and other data useful for debugging.`,
142
+ humanReadableDescription: "Retrieve sample crash and exception events by resource name for debugging.",
141
143
  inputSchema: zod_1.z.object({
142
144
  appId: filters_1.ApplicationIdSchema,
143
145
  names: zod_1.z
@@ -11,6 +11,7 @@ const app_id_1 = require("../../resources/guides/app_id");
11
11
  exports.get_issue = (0, tool_1.tool)("crashlytics", {
12
12
  name: "get_issue",
13
13
  description: `Gets data for a Crashlytics issue, which can be used as a starting point for debugging.`,
14
+ humanReadableDescription: "Retrieve details and metadata for a specific Crashlytics issue.",
14
15
  inputSchema: zod_1.z.object({
15
16
  appId: filters_1.ApplicationIdSchema,
16
17
  issueId: filters_1.IssueIdSchema,
@@ -41,6 +42,7 @@ exports.get_issue = (0, tool_1.tool)("crashlytics", {
41
42
  exports.update_issue = (0, tool_1.tool)("crashlytics", {
42
43
  name: "update_issue",
43
44
  description: "Use this to update the state of Crashlytics issue.",
45
+ humanReadableDescription: "Update the state (OPEN or CLOSED) of a Crashlytics issue.",
44
46
  inputSchema: zod_1.z.object({
45
47
  appId: filters_1.ApplicationIdSchema,
46
48
  issueId: filters_1.IssueIdSchema,
@@ -9,6 +9,7 @@ const util_1 = require("../../util");
9
9
  exports.create_note = (0, tool_1.tool)("crashlytics", {
10
10
  name: "create_note",
11
11
  description: "Add a note to an issue from crashlytics. Only supported for mobile (Android and iOS) apps.",
12
+ humanReadableDescription: "Add a note to a Crashlytics issue for an Android or iOS app.",
12
13
  inputSchema: zod_1.z.object({
13
14
  appId: filters_1.ApplicationIdSchema,
14
15
  issueId: filters_1.IssueIdSchema,
@@ -33,6 +34,7 @@ exports.create_note = (0, tool_1.tool)("crashlytics", {
33
34
  exports.list_notes = (0, tool_1.tool)("crashlytics", {
34
35
  name: "list_notes",
35
36
  description: "Use this to list all notes for an issue in Crashlytics. Only supported for mobile (Android and iOS) apps.",
37
+ humanReadableDescription: "List all notes attached to a Crashlytics issue for an Android or iOS app.",
36
38
  inputSchema: zod_1.z.object({
37
39
  appId: filters_1.ApplicationIdSchema,
38
40
  issueId: filters_1.IssueIdSchema,
@@ -55,6 +57,7 @@ exports.list_notes = (0, tool_1.tool)("crashlytics", {
55
57
  exports.delete_note = (0, tool_1.tool)("crashlytics", {
56
58
  name: "delete_note",
57
59
  description: "Delete a note from a Crashlytics issue. Only supported for mobile (Android and iOS) apps.",
60
+ humanReadableDescription: "Delete a note from a Crashlytics issue for an Android or iOS app.",
58
61
  inputSchema: zod_1.z.object({
59
62
  appId: filters_1.ApplicationIdSchema,
60
63
  issueId: filters_1.IssueIdSchema,
@@ -35,6 +35,7 @@ exports.get_report = (0, tool_1.tool)("crashlytics", {
35
35
  name: "get_report",
36
36
  description: `Use this to request numerical reports from Crashlytics. The result aggregates the sum of events and impacted users, grouped by a dimension appropriate for that report. Agents must read the [Firebase Crashlytics Reports Guide](firebase://guides/crashlytics/reports) using the \`firebase_read_resources\` tool before calling to understand critical prerequisites for requesting reports and how to interpret the results.
37
37
  `.trim(),
38
+ humanReadableDescription: "Generate aggregated numerical reports for Crashlytics issues and events.",
38
39
  inputSchema: reports_1.ReportInputSchema,
39
40
  annotations: {
40
41
  title: "Get Crashlytics Report",
@@ -29,6 +29,7 @@ Resolves service directories defined in the project's \`firebase.json\` under \`
29
29
  "error_filter": "schema"
30
30
  }
31
31
  \`\`\``,
32
+ humanReadableDescription: "Compile Firebase SQL Connect schemas, operations, and connectors to validate syntax and types.",
32
33
  inputSchema: zod_1.z.object({
33
34
  error_filter: zod_1.z
34
35
  .enum(["all", "schema", "operations"])
@@ -10,6 +10,7 @@ const emulator_1 = require("../../util/dataconnect/emulator");
10
10
  exports.execute = (0, tool_1.tool)("dataconnect", {
11
11
  name: "execute",
12
12
  description: "Use this to execute a GraphQL operation against a SQL Connect service or its emulator.",
13
+ humanReadableDescription: "Execute a GraphQL query or mutation against a Firebase SQL Connect service or emulator.",
13
14
  inputSchema: zod_1.z.object({
14
15
  query: zod_1.z.string().describe(`A Firebase SQL Connect GraphQL query or mutation to execute.
15
16
  You can use the \`dataconnect_generate_operation\` tool to generate a query.
@@ -12,6 +12,7 @@ const js_yaml_1 = require("js-yaml");
12
12
  exports.list_services = (0, tool_1.tool)("dataconnect", {
13
13
  name: "list_services",
14
14
  description: "Use this to list existing local and backend Firebase SQL Connect services",
15
+ humanReadableDescription: "List local and deployed Firebase SQL Connect services, schemas, and connectors.",
15
16
  inputSchema: zod_1.z.object({}),
16
17
  annotations: {
17
18
  title: "List existing Firebase SQL Connect services",
@@ -10,6 +10,7 @@ const types_1 = require("../../../emulator/types");
10
10
  exports.query_collection = (0, tool_1.tool)("firestore", {
11
11
  name: "query_collection",
12
12
  description: "Use this to retrieve one or more Firestore documents from a collection in a database in the current project by a collection with a full document path. Use this if you know the exact path of a collection and the filtering clause you would like for the document.",
13
+ humanReadableDescription: "Query Firestore documents from a collection with optional filters and ordering.",
13
14
  inputSchema: zod_1.z.object({
14
15
  database: zod_1.z
15
16
  .string()
@@ -41,6 +41,7 @@ function validateTimestamp(label, value) {
41
41
  exports.get_logs = (0, tool_1.tool)("functions", {
42
42
  name: "get_logs",
43
43
  description: "Use this to retrieve a page of Cloud Functions log entries using Google Cloud Logging advanced filters.",
44
+ humanReadableDescription: "Retrieve and filter Cloud Functions log entries from Google Cloud Logging.",
44
45
  inputSchema: zod_1.z.object({
45
46
  function_names: zod_1.z
46
47
  .array(zod_1.z.string())
@@ -9,6 +9,7 @@ const error_1 = require("../../../error");
9
9
  exports.list_functions = (0, tool_1.tool)("functions", {
10
10
  name: "list_functions",
11
11
  description: "List all deployed functions in your Firebase project.",
12
+ humanReadableDescription: "List all deployed Cloud Functions in your Firebase project.",
12
13
  inputSchema: zod_1.z.object({}),
13
14
  annotations: {
14
15
  title: "List Deployed Functions",
@@ -107,7 +107,9 @@ async function markdownDocsOfTools() {
107
107
  if (feature === "firebase") {
108
108
  feature = "core";
109
109
  }
110
- const description = (tool.mcp?.description || "").replaceAll("\n", "<br>");
110
+ const description = (tool.mcp.humanReadableDescription ||
111
+ tool.mcp.description ||
112
+ "").replaceAll("\n", "<br>");
111
113
  doc += `
112
114
  | ${tool.mcp.name} | ${feature} | ${description} |`;
113
115
  }
@@ -8,6 +8,7 @@ const sendMessage_1 = require("../../../messaging/sendMessage");
8
8
  exports.send_message = (0, tool_1.tool)("messaging", {
9
9
  name: "send_message",
10
10
  description: "Use this to send a message to a Firebase Cloud Messaging registration token or topic. ONLY ONE of `registration_token` or `topic` may be supplied in a specific call.",
11
+ humanReadableDescription: "Send a Firebase Cloud Messaging push notification to a device registration token or topic.",
11
12
  inputSchema: zod_1.z.object({
12
13
  registration_token: zod_1.z
13
14
  .string()
@@ -11,6 +11,7 @@ const node_path_1 = require("node:path");
11
11
  exports.get_data = (0, tool_1.tool)("database", {
12
12
  name: "get_data",
13
13
  description: "Use this to retrieve data from the specified location in a Firebase Realtime Database.",
14
+ humanReadableDescription: "Read data from a specified path in the Firebase Realtime Database.",
14
15
  inputSchema: zod_1.z.object({
15
16
  databaseUrl: zod_1.z
16
17
  .string()
@@ -12,6 +12,7 @@ const node_path_1 = require("node:path");
12
12
  exports.set_data = (0, tool_1.tool)("database", {
13
13
  name: "set_data",
14
14
  description: "Use this to write data to the specified location in a Firebase Realtime Database.",
15
+ humanReadableDescription: "Write JSON data to a specified path in the Firebase Realtime Database.",
15
16
  inputSchema: zod_1.z.object({
16
17
  databaseUrl: zod_1.z
17
18
  .string()