Skip to main content
Glama
nonead

Nonead Universal-Robots MCP Server

by nonead

get_time

Retrieves the uptime in seconds of a Universal Robots cobot by providing its IP address. Helps monitor robot runtime without teach pendant.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ipYes

Implementation Reference

  • The MCP tool handler function for 'get_time'. It takes an IP address, checks connection, and returns the robot's uptime in seconds by calling robotModle_list[ip].RobotTimestamp().
    @mcp.tool()
    def get_time(ip: str) -> str:
        """根据用户提供的IP,获取指定机器人的开机时长(秒)
        IP:机器人地址"""
        try:
            if '连接成功' not in link_check(ip):
                return return_msg(f"与机器人的连接已断开。IP:{ip}")
            logger.info(f"{robotModle_list[ip].RobotTimestamp():.2f}")
            return return_msg(f"{robotModle_list[ip].RobotTimestamp():.2f}")
        except Exception as e:
            logger.error(f"获取开机时长失败: {str(e)}")
            return return_msg(f"获取开机时长失败: {str(e)}")
  • The tool is registered via the @mcp.tool() decorator, where 'mcp' is a FastMCP instance from the MCP framework.
    @mcp.tool()
  • The RobotTimestamp() method on RobotModel class returns the 'timestamp' value from self.dataDir dictionary, which represents robot uptime.
    def RobotTimestamp(self):
        return self.dataDir['timestamp']
  • The return_msg helper function that wraps the result string in a JSON response.
    def return_msg(txt: str):
        return json.dumps(txt, indent=2, ensure_ascii=False)
  • The link_check helper function that verifies the robot connection is active before executing the tool.
    def link_check(ip):
        """检查连接状态,若连接断开或不存在,则建立连接"""
        if robot_list.get(ip, "unknown") == "unknown" or not robot_list[
            ip].robotConnector.RTDE.isRunning():
            return connect_ur(ip)
        return '连接成功'
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must fully disclose behavior. It only states a read operation with no mention of side effects, permissions, rate limits, or error handling, lacking sufficient detail for a comprehensive understanding.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with two lines, front-loading the core purpose and parameter explanation. Every word earns its place with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (one parameter, no output schema), the description provides adequate context: what the tool does and what the parameter means. It does not specify return format but is sufficient for a basic getter.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage, but the description adds meaning to the 'ip' parameter by explaining it is the robot address. This compensates for the schema's lack of description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: getting the boot time (seconds) of a robot based on an IP address. It uses a specific verb-resource combination and is distinct from sibling tools which get other robot attributes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, no prerequisites, and no context about appropriate usage scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/Nonead-Universal-Robots-MCP'

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