diff --git a/src/mcp/README.md b/src/mcp/README.md index ce73bbc84ba..461e015b01c 100644 --- a/src/mcp/README.md +++ b/src/mcp/README.md @@ -42,7 +42,6 @@ npx -y firebase-tools login - `--only `: A comma-separated list of feature groups to activate. Use this to limit the tools exposed to only features you are actively using. ## Tools - | Tool Name | Feature Group | Description | | -------------------------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | firebase_get_project | core | Retrieves information about the currently active Firebase project. | @@ -97,7 +96,7 @@ npx -y firebase-tools login | crashlytics_update_issue | crashlytics | Update the state of an issue in Crashlytics. | | apphosting_fetch_logs | apphosting | Fetches 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. | | apphosting_list_backends | apphosting | Retrieves a list of App Hosting backends in the current project. An empty list means that there are no backends. The `uri` is the public URL of the backend. A working backend will have a `managed_resources` array that will contain a `run_service` entry. That `run_service.service` is the resource name of the Cloud Run service serving the App Hosting backend. The last segment of that name is the service ID. `domains` is the list of domains that are associated with the backend. They either have type `CUSTOM` or `DEFAULT`. Every backend should have a `DEFAULT` domain. The actual domain that a user would use to conenct to the backend is the last parameter of the domain resource name. If a custom domain is correctly set up, it will have statuses ending in `ACTIVE`. | -| database_get_data | database | Returns RTDB data from the specified location | -| database_set_data | database | Writes RTDB data to the specified location | -| database_get_rules | database | Get an RTDB database's rules | -| database_validate_rules | database | Validates an RTDB database's rules | +| rtdb_get_data | database | Returns RTDB data from the specified location | +| rtdb_set_data | database | Writes RTDB data to the specified location | +| rtdb_get_rules | database | Get an RTDB database's rules | +| rtdb_validate_rules | database | Validates an RTDB database's rules | diff --git a/src/mcp/prompts/index.ts b/src/mcp/prompts/index.ts index 9c15cd127a2..d939c6bdb5b 100644 --- a/src/mcp/prompts/index.ts +++ b/src/mcp/prompts/index.ts @@ -14,7 +14,7 @@ const prompts: Record = { remoteconfig: [], crashlytics: crashlyticsPrompts, apphosting: [], - database: [], + rtdb: [], }; function namespacePrompts( diff --git a/src/mcp/tools/index.ts b/src/mcp/tools/index.ts index 85c2b7f8e19..95c9b6cc985 100644 --- a/src/mcp/tools/index.ts +++ b/src/mcp/tools/index.ts @@ -9,7 +9,7 @@ import { messagingTools } from "./messaging/index"; import { remoteConfigTools } from "./remoteconfig/index"; import { crashlyticsTools } from "./crashlytics/index"; import { appHostingTools } from "./apphosting/index"; -import { realtimeDatabaseTools } from "./database/index"; +import { rtdbTools } from "./rtdb/index"; /** availableTools returns the list of MCP tools available given the server flags */ export function availableTools(activeFeatures?: ServerFeature[]): ServerTool[] { @@ -36,7 +36,7 @@ const tools: Record = { remoteconfig: addFeaturePrefix("remoteconfig", remoteConfigTools), crashlytics: addFeaturePrefix("crashlytics", crashlyticsTools), apphosting: addFeaturePrefix("apphosting", appHostingTools), - database: addFeaturePrefix("database", realtimeDatabaseTools), + rtdb: addFeaturePrefix("rtdb", rtdbTools), }; function addFeaturePrefix(feature: string, tools: ServerTool[]): ServerTool[] { diff --git a/src/mcp/tools/database/get_data.ts b/src/mcp/tools/rtdb/get_data.ts similarity index 100% rename from src/mcp/tools/database/get_data.ts rename to src/mcp/tools/rtdb/get_data.ts diff --git a/src/mcp/tools/database/get_rules.ts b/src/mcp/tools/rtdb/get_rules.ts similarity index 100% rename from src/mcp/tools/database/get_rules.ts rename to src/mcp/tools/rtdb/get_rules.ts diff --git a/src/mcp/tools/database/index.ts b/src/mcp/tools/rtdb/index.ts similarity index 68% rename from src/mcp/tools/database/index.ts rename to src/mcp/tools/rtdb/index.ts index f532461fa74..b9f1371afca 100644 --- a/src/mcp/tools/database/index.ts +++ b/src/mcp/tools/rtdb/index.ts @@ -4,4 +4,4 @@ import { get_data } from "./get_data"; import { set_data } from "./set_data"; import { validate_rules } from "./validate_rules"; -export const realtimeDatabaseTools: ServerTool[] = [get_data, set_data, get_rules, validate_rules]; +export const rtdbTools: ServerTool[] = [get_data, set_data, get_rules, validate_rules]; diff --git a/src/mcp/tools/database/set_data.ts b/src/mcp/tools/rtdb/set_data.ts similarity index 100% rename from src/mcp/tools/database/set_data.ts rename to src/mcp/tools/rtdb/set_data.ts diff --git a/src/mcp/tools/database/validate_rules.ts b/src/mcp/tools/rtdb/validate_rules.ts similarity index 100% rename from src/mcp/tools/database/validate_rules.ts rename to src/mcp/tools/rtdb/validate_rules.ts diff --git a/src/mcp/types.ts b/src/mcp/types.ts index 231aba6fa8a..9fbc857eb52 100644 --- a/src/mcp/types.ts +++ b/src/mcp/types.ts @@ -12,7 +12,7 @@ export const SERVER_FEATURES = [ "remoteconfig", "crashlytics", "apphosting", - "database", + "rtdb", ] as const; export type ServerFeature = (typeof SERVER_FEATURES)[number]; diff --git a/src/mcp/util.ts b/src/mcp/util.ts index 14725b43483..f84ff0af186 100644 --- a/src/mcp/util.ts +++ b/src/mcp/util.ts @@ -72,7 +72,7 @@ const SERVER_FEATURE_APIS: Record = { remoteconfig: remoteConfigApiOrigin(), crashlytics: crashlyticsApiOrigin(), apphosting: apphostingOrigin(), - database: realtimeOrigin(), + rtdb: realtimeOrigin(), }; /**