Skip to main content
Glama

config_list

Retrieve current Google Cloud configuration settings directly within GCP MCP, enabling users to view and manage GCP resources without manual credential setup.

Instructions

    List the current Google Cloud configuration.
    
    Returns:
        Current configuration settings
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'config_list' MCP tool. It retrieves and displays the current Google Cloud configuration, including project ID, authentication status, and additional config file settings.
    @mcp.tool()
    def config_list() -> str:
        """
        List the current Google Cloud configuration.
        
        Returns:
            Current configuration settings
        """
        try:
            # Get project ID from config
            project_id = _get_project_id_from_config()
            
            # Get project ID from global variable if set
            if _current_project_id:
                project_id = _current_project_id
            
            output = "Current Configuration:\n"
            
            if project_id:
                output += f"- Project ID: {project_id}\n"
            else:
                output += "- Project ID: Not set\n"
            
            # Check if we have active credentials
            try:
                import google.auth
                
                credentials, default_project = google.auth.default()
                
                if hasattr(credentials, 'service_account_email'):
                    output += f"- Authenticated as: {credentials.service_account_email} (Service Account)\n"
                else:
                    output += "- Authenticated as: User Account\n"
                
                if default_project and default_project != project_id:
                    output += f"- Default Project in Credentials: {default_project}\n"
            except Exception:
                output += "- Authentication: Not authenticated or credentials not found\n"
            
            # Get additional configuration
            config_file = os.path.join(_get_config_path(), 'configurations', 'config_default')
            if os.path.exists(config_file):
                try:
                    with open(config_file, 'r') as f:
                        config_lines = f.readlines()
                    
                    if config_lines:
                        output += "\nAdditional Configuration Settings:\n"
                        for line in config_lines:
                            line = line.strip()
                            if line and not line.startswith('#') and '=' in line:
                                key, value = line.split('=', 1)
                                key = key.strip()
                                value = value.strip()
                                
                                # Skip project since we already displayed it
                                if key != 'project':
                                    output += f"- {key}: {value}\n"
                except:
                    pass
            
            return output
            
        except Exception as e:
            return f"Error listing configuration: {str(e)}"
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the tool returns 'current configuration settings', but lacks details on what specific settings are included, format of the output, whether it's a read-only operation, or any permissions required. This leaves significant gaps for an agent to understand the tool's behavior.

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

Conciseness5/5

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

The description is extremely concise and well-structured, with just two sentences that directly state the purpose and return value. Every word earns its place, and it is front-loaded with the core functionality, making it easy for an agent to parse quickly.

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

Completeness2/5

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

Given the complexity of configuration tools and the lack of annotations and output schema, the description is insufficient. It vaguely mentions 'current configuration settings' without specifying scope, format, or examples, leaving the agent uncertain about what to expect. This is inadequate for a tool that likely returns structured data in a cloud environment.

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

Parameters4/5

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

The tool has 0 parameters, and the schema description coverage is 100%, so there is no need for parameter documentation in the description. The description appropriately does not discuss parameters, which is efficient and avoids redundancy, earning a high score for this dimension.

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 ('current Google Cloud configuration'), making it easy to understand what it does. However, it doesn't explicitly differentiate from sibling tools like 'get_gcp_project_details' or 'list_gcp_projects', which might provide overlapping or related configuration information.

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. With many sibling tools that could retrieve configuration-related data (e.g., 'get_gcp_project_details', 'list_gcp_projects'), there is no indication of context, prerequisites, or exclusions to help an agent choose appropriately.

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