Skip to main content
Glama

list_firestore_databases

Retrieve all Firestore databases within a specified Google Cloud Platform project using the project ID for efficient database management and oversight.

Instructions

    List Firestore databases in a GCP project.
    
    Args:
        project_id: The ID of the GCP project to list Firestore databases for
    
    Returns:
        List of Firestore databases in the specified GCP project
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes

Implementation Reference

  • The handler function for the 'list_firestore_databases' tool. It uses the FirestoreAdminClient to list all Firestore databases in the specified GCP project, formats them by name, type, and location, and returns a formatted string list.
        @mcp.tool()
        def list_firestore_databases(project_id: str) -> str:
            """
            List Firestore databases in a GCP project.
            
            Args:
                project_id: The ID of the GCP project to list Firestore databases for
            
            Returns:
                List of Firestore databases in the specified GCP project
            """
            try:
                from google.cloud import firestore_admin_v1
                
                # Initialize the Firestore Admin client
                client = firestore_admin_v1.FirestoreAdminClient()
                
                # List databases
                parent = f"projects/{project_id}"
                databases = client.list_databases(parent=parent)
                
                # Format the response
                databases_list = []
                
                for database in databases:
                    name = database.name.split('/')[-1]
                    db_type = "Firestore Native" if database.type_ == firestore_admin_v1.Database.DatabaseType.FIRESTORE_NATIVE else "Datastore Mode"
                    location = database.location_id
                    
                    databases_list.append(f"- {name} (Type: {db_type}, Location: {location})")
                
                if not databases_list:
                    return f"No Firestore databases found in project {project_id}."
                
                databases_str = "\n".join(databases_list)
                
                return f"""
    Firestore Databases in GCP Project {project_id}:
    {databases_str}
    """
            except Exception as e:
                return f"Error listing Firestore databases: {str(e)}"
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states the operation is a 'List' which implies read-only behavior, but doesn't mention authentication requirements, rate limits, pagination behavior, error conditions, or what format the returned list takes. For a tool with zero annotation coverage, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (purpose, Args, Returns) and uses minimal sentences. Every sentence serves a purpose, though the Returns section could be more informative given there's no output schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple list operation with 1 parameter and no output schema, the description covers the basics but leaves gaps. It explains what the tool does and documents the parameter, but doesn't address behavioral aspects like authentication, error handling, or return format details that would be helpful for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description explicitly documents the single parameter 'project_id' in the Args section, providing semantic meaning beyond the schema's 0% coverage. However, it doesn't explain format requirements (e.g., GCP project ID format) or provide examples. With 1 parameter and schema coverage at 0%, the description adds value but could be more comprehensive.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('List') and resource ('Firestore databases in a GCP project'). It distinguishes from siblings like 'list_databases' by specifying Firestore databases, but doesn't explicitly differentiate from 'list_firestore_collections' which operates at a different resource level.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'list_databases' (which might list other database types) or 'list_firestore_collections' (which lists collections within a database). It only states what the tool does, not when it's appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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/henihaddad/gcp-mcp'

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