Cover namespace skip parameters

This commit is contained in:
kigland 2026-06-09 09:10:36 +08:00
parent f42804995b
commit 20f9a45281

View file

@ -1228,13 +1228,19 @@ class TestToolTransformation:
)
assert result_tool["function"]["parameters"] == namespace_tool["parameters"]
def test_transform_namespace_tools_without_schema_skips(self):
"""Name-only namespace tools are skipped instead of becoming hollow functions."""
namespace_tool = {
"type": "namespace",
"name": "mcp__node_repl",
}
@pytest.mark.parametrize(
"namespace_tool",
[
{"type": "namespace", "name": "mcp__node_repl"},
{
"type": "namespace",
"name": "mcp__node_repl",
"description": "Runtime namespace exposed by MCP",
},
],
)
def test_transform_namespace_tools_without_schema_skips(self, namespace_tool):
"""Namespace tools without parameters are skipped instead of becoming hollow functions."""
(
result_tools,
web_search_options,