Skip to main content
Glama
nonead

nUR MCP Server

by nonead

get_actual_tcp_pose

Retrieve the current TCP position of a Universal Robots collaborative robot by specifying its IP address to monitor or control its precise location.

Instructions

获取指定IP机器人的当前TCP位置 IP:机器人地址

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ipYes

Implementation Reference

  • The primary MCP tool handler for 'get_actual_tcp_pose'. It takes an IP address, checks the connection, and retrieves the current TCP pose from the connected UR robot instance (UrScriptExt), logging and returning the pose as a formatted message.
    @mcp.tool()
    def get_actual_tcp_pose(ip: str):
        """获取指定IP机器人的当前TCP位置
        IP:机器人地址"""
        try:
            if '连接失败' in link_check(ip):
                return return_msg(f"与机器人的连接已断开。")
            logger.info(f"当前TCP位置: {robot_list[ip].get_actual_tcp_pose()}")
            return return_msg(f"当前TCP位置: {robot_list[ip].get_actual_tcp_pose()}")
        except Exception as e:
            logger.error(f"TCP位置获取失败: {str(e)}")
            return return_msg(f"TCP位置获取失败: {str(e)}")
  • The @mcp.tool() decorator registers this function as an MCP tool in the FastMCP server. All such decorated functions are automatically registered when mcp.run() is called in main().
    @mcp.tool()
    def get_actual_tcp_pose(ip: str):
        """获取指定IP机器人的当前TCP位置
        IP:机器人地址"""
        try:
            if '连接失败' in link_check(ip):
                return return_msg(f"与机器人的连接已断开。")
            logger.info(f"当前TCP位置: {robot_list[ip].get_actual_tcp_pose()}")
            return return_msg(f"当前TCP位置: {robot_list[ip].get_actual_tcp_pose()}")
        except Exception as e:
            logger.error(f"TCP位置获取失败: {str(e)}")
            return return_msg(f"TCP位置获取失败: {str(e)}")
  • Input schema defined by function signature (ip: str) and docstring describing the parameter as the robot's IP address. Output is a JSON string via return_msg containing the TCP pose.
    def get_actual_tcp_pose(ip: str):
        """获取指定IP机器人的当前TCP位置
        IP:机器人地址"""
  • Supporting method in UrScriptExt that prints the actual TCP pose by calling the underlying get_actual_tcp_pose() method (likely inherited), which is delegated to by the MCP handler.
    self.print_pose(self.get_actual_tcp_pose())
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the action but doesn't describe whether this is a read-only operation, if it requires the robot to be connected or in a specific state, potential errors, or response format. For a tool interacting with hardware, this lack of behavioral context is a significant gap.

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 brief sentences that directly state the purpose and parameter meaning. It's front-loaded with the main function. While efficient, it could be more structured with clearer separation of purpose and parameter details.

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 the complexity of robot control tools, no annotations, no output schema, and minimal parameter documentation, the description is incomplete. It doesn't explain what TCP position means in this context, the return format, error conditions, or dependencies on other tools like 'connect_ur'. For a hardware-interfacing tool, this leaves critical gaps.

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?

The description adds minimal semantic context for the single parameter 'ip' by stating 'IP:机器人地址' (IP: robot address), which clarifies it's a robot IP address. However, with 0% schema description coverage and only one parameter, this provides basic but insufficient detail (e.g., format, examples, or constraints). The baseline is appropriate given the simple parameter structure.

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 verb '获取' (get/retrieve) and the resource '指定IP机器人的当前TCP位置' (current TCP position of a specified IP robot), making the purpose understandable. It distinguishes from siblings like 'get_actual_joint_pose' by specifying TCP position instead of joint pose. However, it doesn't explicitly differentiate from other position-related tools beyond the name.

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?

No guidance is provided on when to use this tool versus alternatives. The description only states what it does without mentioning prerequisites, context, or comparisons to sibling tools like 'get_actual_joint_pose' or movement commands. This leaves the agent without explicit usage direction.

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