We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/CoplayDev/unity-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
test_manage_prefabs.py•1.69 KiB
"""Tests for manage_prefabs tool - component_properties parameter."""
import inspect
from services.tools.manage_prefabs import manage_prefabs
class TestManagePrefabsComponentProperties:
"""Tests for the component_properties parameter on manage_prefabs."""
def test_component_properties_parameter_exists(self):
"""The manage_prefabs tool should have a component_properties parameter."""
sig = inspect.signature(manage_prefabs)
assert "component_properties" in sig.parameters
def test_component_properties_parameter_is_optional(self):
"""component_properties should default to None."""
sig = inspect.signature(manage_prefabs)
param = sig.parameters["component_properties"]
assert param.default is None
def test_tool_description_mentions_component_properties(self):
"""The tool description should mention component_properties."""
from services.registry import get_registered_tools
tools = get_registered_tools()
prefab_tool = next(
(t for t in tools if t["name"] == "manage_prefabs"), None
)
assert prefab_tool is not None
# Description is stored at top level or in kwargs depending on how the decorator stores it
desc = prefab_tool.get("description") or prefab_tool.get("kwargs", {}).get("description", "")
assert "component_properties" in desc
def test_required_params_include_modify_contents(self):
"""modify_contents should be a valid action requiring prefab_path."""
from services.tools.manage_prefabs import REQUIRED_PARAMS
assert "modify_contents" in REQUIRED_PARAMS
assert "prefab_path" in REQUIRED_PARAMS["modify_contents"]