List tools from the AgentRPC API. Args: params: Parameters including clusterId. Returns: The API response. Raises: AgentRPCError: If the request fails.
(self, params: Dict[str, Any])
| 36 | } |
| 37 | |
| 38 | def list_tools(self, params: Dict[str, Any]) -> Dict[str, Any]: |
| 39 | """List tools from the AgentRPC API. |
| 40 | |
| 41 | Args: |
| 42 | params: Parameters including clusterId. |
| 43 | |
| 44 | Returns: |
| 45 | The API response. |
| 46 | |
| 47 | Raises: |
| 48 | AgentRPCError: If the request fails. |
| 49 | """ |
| 50 | cluster_id = params.get("params", {}).get("clusterId") |
| 51 | if not cluster_id: |
| 52 | raise AgentRPCError("clusterId is required") |
| 53 | |
| 54 | try: |
| 55 | response = self.get(f"/clusters/{cluster_id}/tools") |
| 56 | return {"status": 200, "body": response} |
| 57 | except Exception as e: |
| 58 | raise AgentRPCError(f"Failed to list tools: {str(e)}") |
| 59 | |
| 60 | def create_job( |
| 61 | self, |
nothing calls this directly
no test coverage detected