Skip to main content
Glama
nonead

nUR MCP Server

by nonead

get_programs

Retrieve all programs from a Universal Robots collaborative robot by connecting via SSH with IP address, username, and password credentials.

Instructions

获取指定IP机器人的所有程序。 IP:机器人地址 username:ssh账号 password:ssh密码

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ipYes
usernameNoroot
passwordNoeasybot

Implementation Reference

  • Handler function for 'get_programs' tool: Establishes SSH connection to UR robot using provided IP, username, and password; lists .urp program files in /programs directory; returns the list of programs.
    @mcp.tool()
    def get_programs(ip: str, username='root', password='easybot'):
        """获取指定IP机器人的所有程序。
        IP:机器人地址
        username:ssh账号
        password:ssh密码
        """
        try:
            ssh = paramiko.SSHClient()
            ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
            ssh.connect(hostname=ip, port=22, username=username, password=password)
            # 创建交互式 shell
            shell = ssh.invoke_shell()
            # 执行多个命令
            shell.send('cd /programs\n')
            shell.send('ls -1\n')
            # 获取输出
            import time
            time.sleep(1)  # 等待命令执行
            output = shell.recv(65535).decode()
            ssh.close()
            files = []
            for file in output.split('\n'):
                name = file.replace(' ', '').replace('\r', '')
                if name.endswith('.urp'):
                    files.append(name)
            logger.info(f"{str(files)}")
            return return_msg(f"命令已发送:{str(files)}")
        except Exception as e:
            return return_msg(f"程序列表获取失败。{str(e)}")
  • The @mcp.tool() decorator registers the get_programs function as an MCP tool.
    @mcp.tool()
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It implies a read operation ('获取' - get) but doesn't specify whether it requires SSH access, what '程序' (programs) entails (e.g., file listings, running processes), error handling, or output format. This leaves significant gaps for a tool with authentication parameters.

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

Conciseness4/5

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

The description is concise with two sentences: one stating the purpose and another listing parameters. It's front-loaded with the main purpose, though the parameter explanations are minimal and could be more structured.

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 no annotations, no output schema, and low schema coverage (0%), the description is incomplete. It doesn't explain what '程序' (programs) means in this context, the return format, error conditions, or SSH-related behaviors, which are critical for a tool with authentication parameters.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must compensate. It lists all three parameters (IP, username, password) with brief explanations in Chinese, adding meaning beyond the schema's titles. However, it doesn't provide details like format constraints (e.g., IP address format) or default values (username: 'root', password: 'easybot' from schema).

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

Purpose4/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: '获取指定IP机器人的所有程序' (Get all programs of the specified IP robot). It uses a specific verb ('获取' - get) and resource ('程序' - programs), though it doesn't explicitly differentiate from sibling tools like 'get_program_state' or 'send_program_script'.

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. It lists parameters but doesn't mention prerequisites, context, or comparisons with sibling tools like 'get_program_state' or 'send_program_script'.

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/nUR-MCP-SERVER'

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