Skip to main content
Glama
XuChen-AI

ros2-inspector

by XuChen-AI

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
ros_install_infoA

检测本机是否安装了 ROS2、装了哪些发行版。无需安装 ROS 即可运行。

何时用:不确定这台机器有没有 ROS、装的什么版本、工具能否查看时, 先调这个再决定用哪些查看类工具。 返回:installed(布尔)、distros 列表(发行版名+路径)、PATH 上是否 直接可用 ros2、当前 MCP 工具将使用的发行版、ROS 相关环境变量。

machine_readinessA

评估本机是否适合安装/运行 ROS2。无需安装 ROS 即可运行(纯 Python,零子进程)。

何时用:准备在这台机器上安装 ROS / 部署机器人软件之前的体检。 返回:操作系统与版本、内核、架构、CPU/内存/磁盘概况、网络接口、 主机名解析、locale、ROS_DOMAIN_ID,并对照官方支持矩阵给出参考结论 (verdict 字段)与改进建议(hints 列表)。

system_overviewA

获取当前 ROS2 系统的一页式快照:节点、话题、连接关系与数量统计。

何时用:回答"系统现在什么状态"类问题的第一入口——先看总览, 发现异常节点/话题后再用 get_node_info / get_topic_info / sample_topic 下钻。 返回:node_count / topic_count 统计、nodes 列表、topics 列表(含类型)、 connections(每个节点的发布/订阅概况)。节点数超过 12 个时只展开前 12 个 (notes 字段会注明)。失败时返回 error 或 notes 说明原因,不会中断会话。

list_nodesA

列出当前 ROS2 系统中所有正在运行的节点名。

何时用:确认某个节点是否活着;排查前先看看系统里有什么。 返回:node_count 与 nodes 列表(全名以 / 开头)。 nodes 为空说明未发现任何节点——系统未启动、与本机 ROS_DOMAIN_ID 不同或 daemon 异常,可用 health_check 进一步检查。 失败时返回 error 字段。

get_node_infoA

获取指定节点的连接详情:发布/订阅哪些话题、提供/调用哪些服务与动作。

何时用:已知节点名,想看它与系统其他部分的连接关系; 或配合 system_overview 下钻某个可疑节点。 参数 node:节点全名,以 / 开头(如 /talker),大小写敏感。 返回:CLI 原始分节报告(Publishers/Subscribers/Service Servers/Action Servers 等)。失败时返回 error(常见原因:名称拼错、节点刚好退出)。

list_topicsA

列出当前系统中的全部话题及其消息类型。

何时用:想看系统里在传什么数据、某个话题的类型是什么。 返回:topic_count 与 topics 列表(name + type 字段)。 失败时返回 error 字段。

get_topic_infoA

获取指定话题的详情:消息类型、发布者数、订阅者数,以及 QoS 配置。

何时用:确认话题类型;排查"发了没人收/收不到"类问题时看双方数量与 QoS。 参数 topic:话题全名,以 / 开头(如 /chatter),大小写敏感; verbose=True 时附带每个端点的 QoS 详情(推荐)。 返回:CLI 原始输出。失败时返回 error(常见:话题不存在)。

sample_topicA

限时采样话题内容:抓取最多 max_messages 条消息,或 timeout_s 秒到期即停。

何时用:想看某话题里数据实际长什么样、字段值是否合理。 参数 topic:话题全名(/ 开头);max_messages:150 条,默认 5; timeout_s:115 秒,默认 5。命令一定会在限时内返回,不会挂起。 返回:messages_received(实际条数)、stopped_because (message_limit / timeout / publisher_stopped)、raw(消息原文,未解析)。 采样窗口内无消息时 note 字段会说明(话题可能没有发布者)。

get_topic_rateA

限时统计话题发布频率:观察 duration_s 秒后返回平均频率。

何时用:排查"数据不更新/更新太慢"类问题——先看频率是否正常。 参数 topic:话题全名(/ 开头);duration_s:1~15 秒,默认 5。 返回:average_rate_hz(平均频率,未统计到时为 None)、raw_tail(原始输出尾部)。 note 字段会说明未统计到频率的原因。

paramsA

读取指定节点的参数(只读,不支持设置)。

何时用:想看某节点配置了什么、某个行为开关当前是什么值。 参数 node:节点全名,以 / 开头(如 /talker); name:参数名(不带前导斜杠,如 use_sim_time;复杂参数名可含 . 与 /)。 name 不传=列出该节点全部参数名;传入=读取该参数当前值 (raw 字段为含类型前缀的原文,如 "Integer value: 10")。 失败时返回 error(常见:节点名拼错、节点无此参数)。

actionsA

查询 ROS2 动作(action)。

何时用:想看系统里有哪些动作、某个动作被谁提供服务。 action_name 不传=列出全部动作(show_types=True 时附带类型); 传入=查看该动作详情:动作服务端/客户端数量(原文返回)。 参数 action_name:动作全名,以 / 开头(如 /rotate_absolute)。 失败时返回 error。

show_interfaceA

查看 ROS2 消息/服务/动作类型的字段定义。

何时用:拿到一个类型名(如 sample_topic 返回里的 type)想看它有哪些字段、 各字段是什么意思。 参数 interface_type:格式为 包/类型/名称,例如 std_msgs/msg/String、 example_interfaces/srv/AddTwoInts、turtlesim/action/RotateAbsolute。 返回:definition 字段为字段定义原文。失败时返回 error(常见:类型名拼错、 相应功能包未安装)。

health_checkA

对 ROS2 环境本身做健康检查:daemon 状态 + doctor 体检结论。

何时用:怀疑问题不在业务节点,而在 ROS 环境/网络/daemon 本身时; 或 list_nodes 为空想进一步定位原因。 返回:daemon_running(是否在运行)、doctor_returncode (0 全部通过 / 1 有警告 / 2 有错误)、verdict(doctor 结论行)、 warnings_found(警告摘要)、raw_tail(doctor 原始输出尾部)。 注意:doctor 含网络检查,最长约 30 秒。失败时返回 error 字段。

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.2/5.0

Scored across 13 tools

Disambiguation4/5

Most tools target clearly distinct objects (nodes, topics, actions, interfaces), and descriptions explicitly route usage. There is mild overlap between system_overview and list_nodes/list_topics (the former is a superset), and three environment tools (ros_install_info, machine_readiness, health_check) share a diagnostic flavor, but each is scoped differently enough to pick correctly.

Naming Consistency3/5

All names are snake_case, which is good, but conventions are mixed: verb_noun (show_interface, list_nodes, get_topic_info, sample_topic), noun-phrase (health_check, machine_readiness, system_overview, ros_install_info), and bare/broad nouns (params, actions). Readable overall but not a predictable single pattern.

Tool Count5/5

13 tools is well within the ideal 3-15 range and each tool covers a distinct slice of ROS2 inspection (install, readiness, health, nodes, topics, sampling, rate, params, actions, interfaces). No tool feels redundant or trivial.

Completeness4/5

The read-only inspection domain is well covered across environment, topology, topics, sampling, params, and actions. Minor gaps: there is no dedicated service-listing or service-calling tool, and params is read-only, but for an inspector these are acceptable and mostly workable via node/topic tools.