MCPcopy Create free account
hub / github.com/agent0ai/agent-zero / get_tools

Method get_tools

helpers/mcp_handler.py:1080–1089  ·  view source on GitHub ↗

Get all tools from all servers

(self)

Source from the content-addressed store, hash-verified

1078 return self.__initialized
1079
1080 def get_tools(self) -> List[dict[str, dict[str, Any]]]:
1081 """Get all tools from all servers"""
1082 with self.__lock:
1083 tools = []
1084 for server in self.servers:
1085 for tool in server.get_tools():
1086 tool_copy = tool.copy()
1087 tool_copy["server"] = server.name
1088 tools.append({f"{server.name}.{tool['name']}": tool_copy})
1089 return tools
1090
1091 def get_tools_prompt(self, server_name: str = "") -> str:
1092 """Get a prompt for all tools"""

Callers 8

get_toolsMethod · 0.45
get_all_toolsMethod · 0.45
get_toolsMethod · 0.45
get_all_toolsMethod · 0.45
get_servers_statusMethod · 0.45
get_server_detailMethod · 0.45
get_tools_promptMethod · 0.45
_mcp_toolsFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected