Get tools with duplicates removed (by name).
(self)
| 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 |
no test coverage detected