File tree Expand file tree Collapse file tree 3 files changed +32
-1
lines changed Expand file tree Collapse file tree 3 files changed +32
-1
lines changed Original file line number Diff line number Diff line change 1+ import type { ServerTool } from "../../tool.js" ;
2+
3+ import { list_dataconnect_services } from "./list_dataconnect_services.js" ;
4+
5+ export const dataconnectTools : ServerTool [ ] = [ list_dataconnect_services ] ;
Original file line number Diff line number Diff line change 1+ import { z } from "zod" ;
2+ import { tool } from "../../tool.js" ;
3+ import { toContent } from "../../util.js" ;
4+ import * as client from "../../../dataconnect/client" ;
5+ import { NO_PROJECT_ERROR } from "../../errors.js" ;
6+
7+ export const list_dataconnect_services = tool (
8+ {
9+ name : "list_dataconnect_services" ,
10+ description : "List the Firebase Data Connect services available in the current project." ,
11+ inputSchema : z . object ( { } ) ,
12+ annotations : {
13+ title : "List the Firebase Data Connect Services that's available in the backend" ,
14+ readOnlyHint : true ,
15+ } ,
16+ _meta : {
17+ requiresProject : true ,
18+ } ,
19+ } ,
20+ async ( _ , { projectId } ) => {
21+ if ( ! projectId ) return NO_PROJECT_ERROR ;
22+ const services = await client . listAllServices ( projectId ) ;
23+ return toContent ( services , { format : "yaml" } ) ;
24+ } ,
25+ ) ;
Original file line number Diff line number Diff line change 11import { ServerTool } from "../tool.js" ;
22import { ServerFeature } from "../types.js" ;
33import { authTools } from "./auth/index.js" ;
4+ import { dataconnectTools } from "./dataconnect/index.js" ;
45import { firestoreTools } from "./firestore/index.js" ;
56import { projectTools } from "./project/index.js" ;
67
78export const tools : Record < ServerFeature , ServerTool [ ] > = {
89 project : projectTools ,
910 firestore : firestoreTools ,
1011 auth : authTools ,
11- dataconnect : [ ] ,
12+ dataconnect : dataconnectTools ,
1213 storage : [ ] ,
1314} ;
You can’t perform that action at this time.
0 commit comments