Skip to main content
Glama

get_time

Retrieve the uptime in seconds for a specific robot by providing its IP address using the nUR MCP Server control tool.

Instructions

根据用户提供的IP,获取指定机器人的开机时长(秒) IP:机器人地址

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ipYes

Implementation Reference

  • The handler function for the 'get_time' tool, decorated with @mcp.tool() for registration. It checks the connection to the robot at the given IP and returns the robot's uptime in seconds using RobotTimestamp(), formatted to 2 decimal places. Handles errors and connection issues.
    @mcp.tool() def get_time(ip: str) -> str: """根据用户提供的IP,获取指定机器人的开机时长(秒) IP:机器人地址""" try: if '连接成功' not in link_check(ip): return return_msg(f"与机器人的连接已断开。IP:{ip}") return return_msg(f"{robotModle_list[ip].RobotTimestamp():.2f}") except Exception as e: logger.error(f"获取开机时长失败: {str(e)}") return return_msg(f"获取开机时长失败: {str(e)}")

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nonead/nUR_MCP_SERVER'

If you have feedback or need assistance with the MCP directory API, please join our Discord server