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)}"

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are provided, so the description must disclose behavioral traits. It merely repeats the tool's name/function without stating that it is read-only, whether authentication is required, or what constitutes 'current configuration.' The verb 'List' hints at non-destructive behavior but does not explicitly guarantee it, which is insufficient without annotation support.

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 very short and front-loaded, but the second sentence ('Returns: Current configuration settings') is mostly redundant with the first. Still, it is compact and free of unnecessary detail, earning a high score for conciseness.

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 parameterless read-only tool, the description is adequate for a basic understanding, but it lacks specifics about what fields are included in the configuration output or whether authentication is required. Given its simplicity, it is mostly complete but could benefit from clarifying the exact scope of what is listed.

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 zero parameters, so the schema coverage is 100% vacuously. The description adds context by mentioning 'Current configuration settings,' which gives a general idea of the output, but since there are no parameters to describe, the baseline of 4 is appropriate.

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 function: 'List the current Google Cloud configuration.' The verb 'List' and the resource 'current Google Cloud configuration' are specific and help distinguish it from sibling tools like config_set_project or auth_login. However, it does not explicitly call out alternatives or differentiate itself from other similarly named list tools.

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

Usage Guidelines3/5

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

The description implies usage when a user needs to see the current configuration, but provides no explicit guidance on when to use this tool versus alternatives like list_gcp_projects or get_gcp_project_details. It also doesn't mention any prerequisites or exclusions, leaving the context somewhat vague.

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