Ollama with MCP using get_gopigo3_vbatt tool

Meanwhile, I made some interesting learning:

  • tinyllama LLM does not allow tools (A LLM needs a “tool” to check the GoPiGo3 battery voltage)
  • qwen2.5:0.5b LLM can use tools and uses less than 1GB of the free 2GB on ROS Robot Lyrical-Dave
    (Dave is using the other 2GB to monitor his battery and decide when to get off and onto his dock.)
  • I learned how to install the Ollama MCP python module to create and use tools

Here is

  • typing a question to the Ollama MCP
    → quen2.5:0.5b LLM
    → MCP get_gopigo3_vbatt tool
    → qwen2.5:0.5b LLM to format the response:


(gopigo3) ubuntu@U26LDave:~/LyricalDave/systests/mcp4ollama$ ./ollama_mcp_client.py 

Question? (about time, vbatt, or anything): What do you know about the GoPiGo3 robot?
00:48:43: User: What do you know about the GoPiGo3 robot?

[06/18/26 00:49:19] INFO     HTTP Request: POST http://127.0.0.1:11434/api/chat "HTTP/1.1 200 OK"                           _client.py:1025
tool_calls:  None
tool_name:  None
00:49:19: qwen2.5:0.5b: I can't directly provide information on the specific features or capabilities of the GoPiGo3 robot, as that would depend on the exact model and firmware version of the device. However, I can guide you on how to interact with the robot if needed:

1. First, make sure your GoPiGo3 is powered on.
2. To control the robot remotely, you need to use an app or command line interface that allows interacting with the robot via Golang and Python (via a third-party library).
3. If you're familiar with programming, you can write commands in the app or script using Python or GoLang and send them to the device's API.
4. The robot is designed for outdoor use, so it needs appropriate protection from weather conditions.

Please let me know if you need help with setting up a remote control interface or have any specific questions about interacting with the robot programmatically.



(gopigo3) ubuntu@U26LDave:~/LyricalDave/systests/mcp4ollama$ ./ollama_mcp_client.py 

Question? (about time, vbatt, or anything): What time is it now
00:44:28: User: What time is it now

[06/18/26 00:44:32] INFO     HTTP Request: POST http://127.0.0.1:11434/api/chat "HTTP/1.1 200 OK"                           _client.py:1025
tool_calls:  [ToolCall(function=Function(name='get_system_datetime', arguments={}))]
tool_name:  get_system_datetime
00:44:32: 🤖 qwen2.5:0.5b triggered the local MCP tool...
⏰ System Clock Output: 2026-06-18 00:44:32
[06/18/26 00:44:40] INFO     HTTP Request: POST http://127.0.0.1:11434/api/chat "HTTP/1.1 200 OK"                           _client.py:1025

00:44:40: qwen2.5:0.5b: The current time is 2026-06-18 00:44:32.


(gopigo3) ubuntu@U26LDave:~/LyricalDave/systests/mcp4ollama$ ./ollama_mcp_client.py 

Question? (about time, vbatt, or anything): What is Dave's battery voltage?
00:44:01: User: What is Dave's battery voltage?

[06/18/26 00:44:06] INFO     HTTP Request: POST http://127.0.0.1:11434/api/chat "HTTP/1.1 200 OK"                           _client.py:1025
tool_calls:  [ToolCall(function=Function(name='get_gopigo3_vbatt', arguments={}))]
tool_name:  get_gopigo3_vbatt
00:44:06: 🤖 qwen2.5:0.5b triggered the local MCP tool...
GoPiGo3 Battery: 12.31 volts
[06/18/26 00:44:12] INFO     HTTP Request: POST http://127.0.0.1:11434/api/chat "HTTP/1.1 200 OK"                           _client.py:1025

00:44:12: qwen2.5:0.5b: Dave's battery voltage is 12.31 volts.

So the LLM+MCP+tool took about 12 seconds and 99% Pi 5 CPU to answer the “use tool” questions, and 36 seconds for the “search your brain” question, but it didn’t crash. Who’s in a hurry!

Then I turned to Carl, and said out loud: “Hey Carl, Battery Voltage?”

  • His antenna LED quickly went bright blue, then green, and
  • after less than a second…
  • he spoke out loud “Battery Voltage 8 point 9 volts”
  • His antenna LED went dim blue

Of course then I had to tell him: “Hey Carl, Go To Sleep”

  • to which he responded immediately “Entering Sleep Mode, Listening Only For ‘Wake Up’”

(Speech Recognition and dialog requires only 20% of his Pi 3 “Brain”)

This exercise may enable putting a natural language front end on the URML tool.

Ollama MCP with Tools in Lyrical Dave’s Git repo