normaliztion fix
This commit is contained in:
20
core/tools/normalize.py
Normal file
20
core/tools/normalize.py
Normal file
@@ -0,0 +1,20 @@
|
||||
# core/tools/normalize.py
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
def normalize_tool_name(name: str) -> str:
|
||||
"""
|
||||
Converts transport-layer tool names (Continue MCP)
|
||||
into internal registry tool names.
|
||||
"""
|
||||
|
||||
if not isinstance(name, str):
|
||||
raise ValueError("tool name must be string")
|
||||
|
||||
name = name.strip()
|
||||
|
||||
# Continue MCP prefix stripping
|
||||
if name.startswith("vs_code_mcp_"):
|
||||
return name[len("vs_code_mcp_"):]
|
||||
|
||||
return name
|
||||
Reference in New Issue
Block a user
