basic_func_test.py 420 B

1234567891011121314151617
  1. from hello_agents.tools import MCPTool
  2. web_search_tool = MCPTool(name="web research", server_command=["npx", "-y", "@mzxrai/mcp-webresearch@latest"])
  3. result = web_search_tool.run({"action": "list_tools"})
  4. print(result)
  5. result = web_search_tool.run({
  6. "action": "call_tool",
  7. "tool_name": "visit_page",
  8. "arguments": {
  9. "url": "https://www.xiangha.com/so/?q=caipu&s=五花肉"
  10. }
  11. })
  12. print(result)