1. Học hỏi
  2. /
  3. Khoa Học
  4. /
  5. Introduction to Model Context Protocol (MCP)

Connected

Bài tập

Calling Server Tools

Now to trigger tool calls in the server from your client! Again, you'll be using asynchronous operations to ensure that nothing breaks or freezes while waiting for other operations to complete.

Hướng dẫn

100 XP
  • Call the tool with the tool_name and arguments parameters specified by the user; ensure that the call pauses to wait for the server to respond using the appropriate Python keyword.
  • Extract and print the text content of the server response.
  • Run the "convert_currency" tool with a set of valid parameters (use whatever values and currencies you wish here).