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

Function mock_tool

tests/commands/definitions/test_execute_tool_command.py:18–32  ·  view source on GitHub ↗

Create a mock tool.

()

Source from the content-addressed store, hash-verified

16
17@pytest.fixture
18def mock_tool():
19 """Create a mock tool."""
20 tool = MagicMock()
21 tool.name = "test_tool"
22 tool.namespace = "test_server"
23 tool.fully_qualified_name = "test_server.test_tool"
24 tool.inputSchema = None # Explicitly set to None to avoid MagicMock auto-creation
25 tool.parameters = {
26 "properties": {
27 "text": {"type": "string", "description": "Test text"},
28 "count": {"type": "number", "description": "Count"},
29 },
30 "required": ["text"],
31 }
32 return tool
33
34
35@pytest.fixture

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected