Skip to main content
Glama

get_environment

Retrieve configuration, status, endpoints, and metadata for a specific Amazon MWAA environment by providing its name.

Instructions

Get detailed information about a specific MWAA environment.

Args: name: The name of the MWAA environment

Returns: Dictionary containing environment details including configuration, status, endpoints, and other metadata

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes

Implementation Reference

  • Registration and handler definition for the 'get_environment' tool in the MCP server. It delegates the call to the MWAATools class.
    @mcp.tool(name="get_environment")
    async def get_environment(
        name: str,
    ) -> Dict[str, Any]:
        """Get detailed information about a specific MWAA environment.
    
        Args:
            name: The name of the MWAA environment
    
        Returns:
            Dictionary containing environment details including configuration,
            status, endpoints, and other metadata
        """
        return await tools.get_environment(name)
  • The actual logic implementation for 'get_environment', using the boto3 mwaa_client to fetch environment details.
    async def get_environment(self, name: str) -> Dict[str, Any]:
        """Get environment details."""
        try:
            response = self.mwaa_client.get_environment(Name=name)
    
            env = response.get("Environment", {})
            if "CreatedAt" in env:
                env["CreatedAt"] = env["CreatedAt"].isoformat()
            if "LastUpdate" in env and "CreatedAt" in env["LastUpdate"]:
                env["LastUpdate"]["CreatedAt"] = env["LastUpdate"]["CreatedAt"].isoformat()
    
            return {"Environment": env}
    
        except (ClientError, BotoCoreError) as e:
            logger.error("Error getting environment %s: %s", name, e)
            return {"error": str(e)}

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/paschmaria/mwaa-mcp-server'

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