delete_environment
Remove an Amazon MWAA environment by specifying its name to delete the managed Apache Airflow workflow environment and its associated resources.
Instructions
Delete an MWAA environment.
Args: name: The name of the environment to delete
Returns: Dictionary with deletion confirmation
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes |
Implementation Reference
- awslabs/mwaa_mcp_server/tools.py:212-222 (handler)The core logic for the delete_environment tool, which invokes the MWAA client's delete_environment method and handles potential errors.
async def delete_environment(self, name: str) -> Dict[str, Any]: """Delete an existing MWAA environment.""" self._check_readonly("delete_environment") try: self.mwaa_client.delete_environment(Name=name) return {"message": f"Environment {name} deleted successfully"} except (ClientError, BotoCoreError) as e: logger.error("Error deleting environment %s: %s", name, e) return {"error": str(e)} - awslabs/mwaa_mcp_server/server.py:202-214 (registration)Tool registration for 'delete_environment' using the mcp.tool decorator, which delegates execution to the tools handler.
@mcp.tool(name="delete_environment") async def delete_environment( name: str, ) -> Dict[str, Any]: """Delete an MWAA environment. Args: name: The name of the environment to delete Returns: Dictionary with deletion confirmation """ return await tools.delete_environment(name)