3535 streamable_http_path = os .getenv ("STREAMABLE_HTTP_PATH" , "/mcp" ))
3636
3737TemplateIdForRegion = {
38- "ap-southeast-1" : "68d24592162cb40008217d6f " ,
38+ "ap-southeast-1" : "6943ba21735f270008330d1c " ,
3939 "cn-beijing" : "68d24592162cb40008217d6f" ,
40- "cn-shanghai" : "68d24592162cb40008217d6f " ,
41- "cn-guangzhou" : "68d24592162cb40008217d6f " ,
40+ "cn-shanghai" : "6943b9de4fa45c0008ea04e1 " ,
41+ "cn-guangzhou" : "6943b95bc69585000819d70f " ,
4242}
4343
4444def validate_and_set_region (region : str = None ) -> str :
@@ -562,7 +562,7 @@ def poll_function_release_status(function_id: str, region: str = None):
562562 time .sleep (interval )
563563 else :
564564 break
565-
565+
566566 responseInfo = {
567567 "function_id" : function_id ,
568568 "region" : region ,
@@ -580,7 +580,7 @@ def poll_function_release_status(function_id: str, region: str = None):
580580
581581def get_function_access_link (function_id : str , region : str = None ):
582582 region = validate_and_set_region (region )
583-
583+
584584 triggers = list_function_triggers (function_id , region ).get ("Result" , {}).get ("Items" , [])
585585 upstream_id = ''
586586 try :
@@ -594,7 +594,7 @@ def get_function_access_link(function_id: str, region: str = None):
594594
595595 if upstream_id == '' :
596596 return ''
597-
597+
598598 try :
599599 body = {
600600 'PageNumber' : 1 ,
@@ -1358,7 +1358,7 @@ def list_vefaas_application_templates(page_number: int = 1, page_size: int = 100
13581358 resp = request (
13591359 "POST" , now , {}, {}, ak , sk , token , "ListApplicationTemplates" , json .dumps (body ), None , 5 ,
13601360 )
1361-
1361+
13621362 except Exception as e :
13631363 raise ValueError (f"Failed to list application templates: { str (e )} " )
13641364
@@ -1370,7 +1370,7 @@ def list_vefaas_application_templates(page_number: int = 1, page_size: int = 100
13701370 "id" : item .get ("Id" , "" ),
13711371 "description" : item .get ("Description" , "" ),
13721372 })
1373-
1373+
13741374 # TODO: dirty code, remove this
13751375 # get function templates for streamlit
13761376 try :
@@ -1395,7 +1395,7 @@ def list_vefaas_application_templates(page_number: int = 1, page_size: int = 100
13951395 })
13961396 except Exception as e :
13971397 logger .error (f"Failed to list function templates: { str (e )} " )
1398-
1398+
13991399 return result
14001400
14011401@mcp .tool (description = """Download a veFaaS application template.
0 commit comments