Skip to main content
Glama
nonead

Nonead Universal-Robots MCP Server

by nonead

get_serial_number

Retrieves the serial number of a Universal Robots cobot by providing its IP address.

Instructions

获取指定IP机器人的序列号 IP:机器人地址

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ipYes

Implementation Reference

  • The handler function that executes the 'get_serial_number' tool logic. It checks connection via link_check, then calls ur_serial_number() on the DashboardClient and returns the result.
    @mcp.tool()
    def get_serial_number(ip: str):
        """获取指定IP机器人的序列号
        IP:机器人地址"""
        try:
            if '连接失败' in link_check(ip):
                return return_msg(f"与机器人的连接已断开。")
            robot_list[ip].robotConnector.DashboardClient.ur_serial_number()
            logger.info(f"IP为{ip}的优傲机器人的序列号为: {robot_list[ip].robotConnector.DashboardClient.last_respond}")
            return return_msg(
                f"IP为{ip}的优傲机器人的序列号为: {robot_list[ip].robotConnector.DashboardClient.last_respond}")
        except Exception as e:
            logger.error(f"获取序列号失败: {str(e)}")
            return return_msg(f"获取序列号失败: {str(e)}")
  • The @mcp.tool() decorator registers this function as an MCP tool named 'get_serial_number'.
    @mcp.tool()
    def get_serial_number(ip: str):
  • Helper function used by get_serial_number to format return messages as JSON strings.
    def return_msg(txt: str):
        return json.dumps(txt, indent=2, ensure_ascii=False)
  • Helper function used by get_serial_number to verify/establish a connection to the robot.
    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 should disclose behavioral traits. However, it only restates the purpose without mentioning whether the operation is read-only, if authorization is needed, or potential side effects. The description adds no transparency beyond the basic action.

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 very short (two brief sentences) and front-loaded with the main purpose. Every part is essential; there is no wasted text. It is appropriately concise for a simple tool.

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

Completeness2/5

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

Given that there is no output schema and no annotations, the description should provide more context about the return value, potential errors, or usage expectations. It only explains the parameter but omits what the serial number looks like or any behavioral details, making it incomplete.

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 one parameter 'ip' with no description (0% coverage). The description explicitly states 'IP:机器人地址' meaning 'IP: robot address', which adds semantic meaning beyond the schema's type and title. This compensates well for the lack of schema 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 that the tool retrieves the serial number of a robot specified by IP address. It uses a specific verb ('获取' meaning 'get') and resource ('序列号' meaning 'serial number'), which distinguishes it from sibling tools like get_robot_model or get_actual_joint_current.

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 exclusions. It simply states what it does without context for usage.

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