You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"connect to the database at url. If omitted, use default database instance <project>-default-rtdb.firebaseio.com. Can point to emulator URL (e.g. localhost:6000/<instance>)",
18
+
"connect to the database at url. If omitted, use default database instance <project>-default-rtdb.firebasedatabase.app. Can point to emulator URL (e.g. localhost:6000/<instance>)",
18
19
),
19
20
path: z.string().describe("The path to the data to read. (ex: /my/cool/path)"),
Copy file name to clipboardExpand all lines: src/mcp/tools/database/set_data.ts
+11-7Lines changed: 11 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,7 @@ import * as url from "node:url";
5
5
import{stringToStream}from"../../../utils";
6
6
import{Client}from"../../../apiv2";
7
7
import{getErrMsg}from"../../../error";
8
+
importpathfrom"node:path";
8
9
9
10
exportconstset_data=tool(
10
11
{
@@ -15,7 +16,7 @@ export const set_data = tool(
15
16
.string()
16
17
.optional()
17
18
.describe(
18
-
"connect to the database at url. If omitted, use default database instance <project>-default-rtdb.firebaseio.com. Can point to emulator URL (e.g. localhost:6000/<instance>)",
19
+
"connect to the database at url. If omitted, use default database instance <project>-default-rtdb.us-central1.firebasedatabase.app. Can point to emulator URL (e.g. localhost:6000/<instance>)",
19
20
),
20
21
path: z.string().describe("The path to the data to read. (ex: /my/cool/path)"),
21
22
data: z.string().describe('The JSON to write. (ex: {"alphabet": ["a", "b", "c"]})'),
@@ -31,15 +32,18 @@ export const set_data = tool(
31
32
requiresProject: false,
32
33
},
33
34
},
34
-
async({ path, databaseUrl, data },{ projectId, host })=>{
35
-
if(!path.startsWith("/")){
36
-
returnmcpError(`paths must start with '/' (you passed ''${path}')`);
35
+
async({path: setPath, databaseUrl, data },{ projectId, host })=>{
36
+
if(!setPath.startsWith("/")){
37
+
returnmcpError(`paths must start with '/' (you passed ''${setPath}')`);
0 commit comments