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

Method get_unique_tools

src/mcp_cli/tools/manager.py:451–461  ·  view source on GitHub ↗

Get tools with duplicates removed (by name).

(self)

Source from the content-addressed store, hash-verified

449 return []
450
451 async def get_unique_tools(self) -> list[ToolInfo]:
452 """Get tools with duplicates removed (by name)."""
453 all_tools = await self.get_all_tools()
454
455 # De-duplicate by name, preferring non-default namespaces
456 seen = {}
457 for tool in all_tools:
458 if tool.name not in seen or tool.namespace != "default":
459 seen[tool.name] = tool
460
461 return list(seen.values())
462
463 async def get_tool_by_name(
464 self, tool_name: str, namespace: str | None = None

Callers 2

executeMethod · 0.45
_initialize_toolsMethod · 0.45

Calls 1

get_all_toolsMethod · 0.95

Tested by

no test coverage detected