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

Class FakeToolManager

tests/planning/test_tools.py:29–56  ·  view source on GitHub ↗

Minimal ToolManager stub.

Source from the content-addressed store, hash-verified

27
28
29class FakeToolManager:
30 """Minimal ToolManager stub."""
31
32 def __init__(self, tool_names: list[str] | None = None):
33 self._tool_names = tool_names or ["read_file", "write_file"]
34
35 async def get_all_tools(self) -> list[FakeToolInfo]:
36 return [FakeToolInfo(name=n) for n in self._tool_names]
37
38 async def get_adapted_tools_for_llm(self, provider: str) -> tuple[list[dict], dict]:
39 tools = [
40 {
41 "type": "function",
42 "function": {
43 "name": n,
44 "description": f"Tool: {n}",
45 "parameters": {
46 "type": "object",
47 "properties": {
48 "path": {"type": "string", "description": "File path"}
49 },
50 "required": ["path"],
51 },
52 },
53 }
54 for n in self._tool_names
55 ]
56 return tools, {}
57
58
59class FakePlanningContext:

Callers 1

__init__Method · 0.70

Calls

no outgoing calls

Tested by 1

__init__Method · 0.56