MCPcopy Create free account
hub / github.com/IBM/mcp-cli / _make_tool

Function _make_tool

tests/context/test_context_manager.py:49–57  ·  view source on GitHub ↗

Create a minimal ToolInfo for testing.

(name: str = "tool1", namespace: str = "ns", **overrides)

Source from the content-addressed store, hash-verified

47
48
49def _make_tool(name: str = "tool1", namespace: str = "ns", **overrides) -> ToolInfo:
50 """Create a minimal ToolInfo for testing."""
51 defaults = dict(
52 name=name,
53 namespace=namespace,
54 description="A test tool",
55 )
56 defaults.update(overrides)
57 return ToolInfo(**defaults)
58
59
60def _make_mock_tool_manager(servers=None, tools=None) -> MagicMock:

Calls 2

ToolInfoClass · 0.90
updateMethod · 0.80

Tested by

no test coverage detected