Skip to main content
Glama

!firestore

Manage and interact with Firestore databases by configuring project credentials and exploring data structures within the db-mcp-tool environment.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
connectionYes

Implementation Reference

  • src/index.ts:100-122 (registration)
    Registration of the !firestore tool, including the inline handler function that sets up and connects to Firestore via DatabaseService
    server.tool( "!firestore", firestoreConnectionSchema, async (args: { connection: DatabaseConnectionConfig }) => { try { const config: DatabaseConfig = { type: 'firestore', connection: args.connection }; dbService = new DatabaseService(config); await dbService.connect(); return { content: [{ type: "text", text: "Successfully connected to Firestore database!" }], }; } catch (error: unknown) { const errorMessage = error instanceof Error ? error.message : 'Unknown error'; return { content: [{ type: "text", text: `Firestore connection error: ${errorMessage}` }], isError: true, }; } } );
  • Zod schema for validating !firestore tool input (projectId and keyFilename)
    const firestoreConnectionSchema = { connection: z.object({ projectId: z.string(), keyFilename: z.string(), }), };
  • Firestore-specific connection logic in DatabaseService.connect() method, initializes Firestore client
    case 'firestore': { const config = this.config.connection as any; this.firestoreClient = new Firestore(config); break; }
  • TypeScript type definitions for DatabaseConfig supporting Firestore connection parameters
    export type DatabaseType = 'postgres' | 'mysql' | 'firestore'; export interface DatabaseConnectionConfig { // PostgreSQL ve MySQL için host?: string; port?: number; database?: string; user?: string; password?: string; // Firestore için projectId?: string; keyFilename?: string; } export interface DatabaseConfig { type: DatabaseType; connection: DatabaseConnectionConfig; }

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wirdes/db-mcp-tool'

If you have feedback or need assistance with the MCP directory API, please join our Discord server