Skip to main content
Glama

get_gcp_project_details

Retrieve comprehensive details about a specific Google Cloud Platform (GCP) project by providing its project ID. Simplifies project management and resource oversight without manual credential setup.

Instructions

    Get detailed information about a specific GCP project.
    
    Args:
        project_id: The ID of the GCP project to get details for
    
    Returns:
        Detailed information about the specified GCP project
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes

Implementation Reference

  • The main handler function for the 'get_gcp_project_details' tool. It uses the Google Cloud ResourceManager v3 client to retrieve and format project details including number, name, creation time, state, and labels.
        @mcp.tool()
        def get_gcp_project_details(project_id: str) -> str:
            """
            Get detailed information about a specific GCP project.
            
            Args:
                project_id: The ID of the GCP project to get details for
            
            Returns:
                Detailed information about the specified GCP project
            """
            try:
                from google.cloud import resourcemanager_v3
                
                # Initialize the Resource Manager client
                client = resourcemanager_v3.ProjectsClient()
                
                # Get the project details
                name = f"projects/{project_id}"
                project = client.get_project(name=name)
                
                # Format the response
                project_number = project.name.split('/')[-1] if project.name else "N/A"
                display_name = project.display_name or "N/A"
                create_time = project.create_time.isoformat() if project.create_time else "N/A"
                state = project.state.name if project.state else "N/A"
                
                labels = dict(project.labels) if project.labels else {}
                labels_str = "\n".join([f"  {k}: {v}" for k, v in labels.items()]) if labels else "  None"
                
                return f"""
    GCP Project Details for {project_id}:
    Project Number: {project_number}
    Name: {display_name}
    Creation Time: {create_time}
    State: {state}
    Labels:
    {labels_str}
    """
            except Exception as e:
                return f"Error getting GCP project details: {str(e)}"
  • The registration call for the resource management tools module, which includes the 'get_gcp_project_details' tool via its @mcp.tool() decorator inside register_tools.
    resource_tools.register_tools(mcp)
  • Top-level call to register_tools() which triggers registration of all GCP tools, including get_gcp_project_details.
    register_tools()
  • Docstring serving as input/output schema for the tool, defining the 'project_id' parameter and return description.
    """
    Get detailed information about a specific GCP project.
    
    Args:
        project_id: The ID of the GCP project to get details for
    
    Returns:
        Detailed information about the specified GCP project
    """
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 states the tool 'gets' information, implying a read-only operation, but doesn't specify whether it requires specific permissions, has rate limits, returns structured data, or handles errors. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 appropriately sized and front-loaded, with the core purpose stated first in a clear sentence. The Args and Returns sections are structured but could be more concise; for example, 'Returns: Detailed information about the specified GCP project' is somewhat vague. Overall, it avoids unnecessary verbosity while maintaining clarity.

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 (a read operation with no output schema and zero annotation coverage), the description is incomplete. It lacks details on authentication requirements, error handling, return format (e.g., JSON structure), and how it differs from sibling tools. Without annotations or an output schema, the description should provide more context to guide effective tool use.

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 schema description coverage is 0%, so the description must compensate. It adds meaning by explaining that 'project_id' is 'The ID of the GCP project to get details for', which clarifies the parameter's purpose beyond the schema's basic type. However, it doesn't provide format examples (e.g., 'my-project-123'), validation rules, or context about where to find the ID, leaving some ambiguity.

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 ('Get') and resource ('detailed information about a specific GCP project'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'list_gcp_projects' or 'get_instance_details', which would require mentioning it retrieves comprehensive metadata for a single project rather than listing projects or getting instance-specific details.

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. It doesn't mention prerequisites (e.g., authentication), compare it to sibling tools like 'list_gcp_projects' for listing projects or 'get_instance_details' for instance-specific info, or specify scenarios where this tool is appropriate (e.g., retrieving project metadata for auditing or configuration).

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