Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/CJackHwang/AIstudioProxyAPI
/ _normalize_endpoint
Function
_normalize_endpoint
api_utils/mcp_adapter.py:9–12 ·
view source on GitHub ↗
(ep: str)
Source
from the content-addressed store, hash-verified
7
8
9
def
_normalize_endpoint(ep: str) -> str:
10
if
not ep:
11
raise
RuntimeError(
"MCP HTTP endpoint not provided"
)
12
return
ep.rstrip(
"/"
)
13
14
15
async
def
execute_mcp_tool(name: str, params: Dict[str, Any]) -> str:
Callers
7
test_empty_string_raises
Method · 0.90
test_no_trailing_slash
Method · 0.90
test_with_single_trailing_slash
Method · 0.90
test_with_multiple_trailing_slashes
Method · 0.90
test_with_path_and_trailing_slash
Method · 0.90
execute_mcp_tool
Function · 0.85
execute_mcp_tool_with_endpoint
Function · 0.85
Calls
no outgoing calls
Tested by
5
test_empty_string_raises
Method · 0.72
test_no_trailing_slash
Method · 0.72
test_with_single_trailing_slash
Method · 0.72
test_with_multiple_trailing_slashes
Method · 0.72
test_with_path_and_trailing_slash
Method · 0.72