lesson 1 of 3 · servers, tools, and the protocol — how ai agents plug into your stackservers, tools, and the protocol — how ai agents plug into your stackservers, tools, and the protocol — how ai agents plug into your stackservers, tools, and the protocol — how ai agents plug into your stacklesson 1 of 3 · servers, tools, and the protocol — how ai agents plug into your stackservers, tools, and the protocol — how ai agents plug into your stackservers, tools, and the protocol — how ai agents plug into your stackservers, tools, and the protocol — how ai agents plug into your stacklesson 1 of 3 · servers, tools, and the protocol — how ai agents plug into your stackservers, tools, and the protocol — how ai agents plug into your stackservers, tools, and the protocol — how ai agents plug into your stackservers, tools, and the protocol — how ai agents plug into your stacklesson 1 of 3 · servers, tools, and the protocol — how ai agents plug into your stackservers, tools, and the protocol — how ai agents plug into your stackservers, tools, and the protocol — how ai agents plug into your stackservers, tools, and the protocol — how ai agents plug into your stacklesson 1 of 3 · servers, tools, and the protocol — how ai agents plug into your stackservers, tools, and the protocol — how ai agents plug into your stackservers, tools, and the protocol — how ai agents plug into your stackservers, tools, and the protocol — how ai agents plug into your stacklesson 1 of 3 · servers, tools, and the protocol — how ai agents plug into your stackservers, tools, and the protocol — how ai agents plug into your stackservers, tools, and the protocol — how ai agents plug into your stackservers, tools, and the protocol — how ai agents plug into your stacklesson 1 of 3 · servers, tools, and the protocol — how ai agents plug into your stackservers, tools, and the protocol — how ai agents plug into your stackservers, tools, and the protocol — how ai agents plug into your stackservers, tools, and the protocol — how ai agents plug into your stacklesson 1 of 3 · servers, tools, and the protocol — how ai agents plug into your stackservers, tools, and the protocol — how ai agents plug into your stackservers, tools, and the protocol — how ai agents plug into your stackservers, tools, and the protocol — how ai agents plug into your stacklesson 1 of 3 · servers, tools, and the protocol — how ai agents plug into your stackservers, tools, and the protocol — how ai agents plug into your stackservers, tools, and the protocol — how ai agents plug into your stackservers, tools, and the protocol — how ai agents plug into your stacklesson 1 of 3 · servers, tools, and the protocol — how ai agents plug into your stackservers, tools, and the protocol — how ai agents plug into your stackservers, tools, and the protocol — how ai agents plug into your stackservers, tools, and the protocol — how ai agents plug into your stacklesson 1 of 3 · servers, tools, and the protocol — how ai agents plug into your stackservers, tools, and the protocol — how ai agents plug into your stackservers, tools, and the protocol — how ai agents plug into your stackservers, tools, and the protocol — how ai agents plug into your stack
Checkpoint
One last thing before we move on. pass this to mark the lesson done, or skip and keep moving. hop to the next when you're ready.
Final drill. Build a tiny MCP client that lists tools, then calls one by name. Write two functions:
list_tool_names(server)— callsserver({"method": "tools/list"})and returns a list of every tool name it advertises.run_tool(server, name, arguments)— callsserver({"method": "tools/call", "params": {"name": name, "arguments": arguments}})and returns the text atresult["content"][0]["text"], OR returns"error"ifisErroris True.
The script will exercise both. Expected output:
['add', 'echo']
5
hi
error