robot_health
Check robot health and connectivity by verifying the robot's operational status and network connection using its IP address.
Instructions
Check robot health and connectivity
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"robot_ip": "<robot_ip>"
},
"name": "robot_health"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| robot_ip | Yes | Robot IP address |
Implementation Reference
- index.js:1935-1979 (handler)The main handler function for the robot_health tool. It sends a GET request to the robot's /health endpoint, extracts key information like API version, firmware, system version, model, and serial, and returns a formatted status report. Handles connection errors gracefully.
async robotHealth(args) { const { robot_ip } = args; try { const data = await this.makeApiRequest( 'GET', `http://${robot_ip}:31950/health` ); const health = data; const links = health.links || {}; let healthText = `✅ **Robot is healthy and connected!**\n\n`; healthText += `**Robot Name:** ${health.name || 'Unknown'}\n`; healthText += `**API Version:** ${health.api_version}\n`; healthText += `**Firmware Version:** ${health.fw_version || 'Unknown'}\n`; healthText += `**System Version:** ${health.system_version || 'Unknown'}\n`; healthText += `**Robot Model:** ${health.robot_model || 'Unknown'}\n`; healthText += `**Robot Serial:** ${health.robot_serial || 'Unknown'}\n\n`; healthText += `**Available Logs:**\n`; Object.entries(links).forEach(([key, value]) => { if (key.includes('Logs')) { healthText += `- ${key}: ${value.href}\n`; } }); return { content: [ { type: "text", text: healthText } ] }; } catch (error) { return { content: [ { type: "text", text: `❌ Failed to check robot health: ${error.message}` } ] }; } - index.js:187-197 (schema)Tool schema definition including name, description, and input schema requiring 'robot_ip' parameter.
{ name: "robot_health", description: "Check robot health and connectivity", inputSchema: { type: "object", properties: { robot_ip: { type: "string", description: "Robot IP address" } }, required: ["robot_ip"] } }, - index.js:262-263 (registration)Registration of the robot_health tool handler in the CallToolRequestSchema switch statement, mapping the tool name to the robotHealth method.
case "robot_health": return this.robotHealth(args);