bmahs-mcp-gateway
This server is a BMAHS-to-MCP gateway that lets an MCP client (LLM agent) discover, inspect, exclusively occupy, and operate LAN hardware devices via standard MCP tools.
Discover devices on the LAN via UDP multicast, mDNS/Bonjour, or a static device table (
bmahs_devices,bmahs_refresh)Read a device's natural-language self-description, full operation list, and security boundaries (
bmahs_describe)Automatically map each device's actions to per-device dynamic MCP tools (e.g.
<device>__brightness) with parameter schemasRun arbitrary device actions generically through
bmahs_callwhen no dedicated tool exists yetExclusively occupy a device with a finite lease (default 120s, capped) via
bmahs_occupy; release it manually withbmahs_release; the gateway auto-carries the occupancy token without exposing it to the modelExecute control actions with automatic occupy → execute → release workflow (CLI
bmahs-mcp ctlalso supports--ttl,--no-release, and manual release)Capture a screenshot from UI-capable devices (
bmahs_screenshot)Serve MCP over stdio for single-client use, or over Streamable HTTP for multi-client shared access with optional Bearer token auth
Handle device errors using a standard envelope (
ok/action/code/error/retryable) that passes Chinese natural-language errors back to the modelRun as a CLI for discovery (
bmahs-mcp discover) and direct control (bmahs-mcp ctl ...) in addition to MCP server modes
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@bmahs-mcp-gatewayturn on the living room light and set brightness to 80"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
bmahs-mcp-gateway
BMAHS(比马斯) 是一个开放的局域网硬件协议:每台设备上电即用自然语言「自我介绍」——我是谁、能做什么、安全边界在哪——让大模型智能体像接入 USB 设备一样,即插即用地发现、识别、按权限独占并安全地操作它们。
BMAHS(比马斯)设备协议 ↔ MCP 网关:把局域网内按 bmahs/1.0 协议发布的硬件设备(解析侧兼容旧版 1–1.2 字段名)动态映射为 Model Context Protocol 工具,让大模型客户端可以直接发现、占用与操作这些设备。
特性
零配置发现:UDP 组播(
239.255.42.42:5354/[ff02::4242]:5354)+ Bonjour/mDNS 双通道,设备上线即被识别;也支持BMAHS_STATIC_DEVICES静态设备表(适配不支持组播的环境)。动态工具映射:设备的动作清单(
ops)自动映射为 MCP 工具,含参数 Schema 与any_of预检,无需为每类设备写适配代码。协议级占用安全:控制前自动
occupy、自动携带 token、任务结束/进程退出自动release,token 不写入 UDP/TXT/日志。标准错误信封:设备错误按 §4.7 信封(
ok/action/code/error/retryable)透传给模型,error为自然语言中文。两种接入模式:stdio(单客户端,MCP 客户端直接拉起)与 Streamable HTTP(多客户端共享一个网关进程,可选 Bearer Token 鉴权)。
Related MCP server: MCP-Edge
安装
pip install bmahs-mcp-gateway # stdio 模式,最小依赖
pip install "bmahs-mcp-gateway[http]" # 需要 Streamable HTTP 共享模式时或使用 uv:uv add bmahs-mcp-gateway;命令行场景推荐隔离安装(不污染系统 Python):uv tool install "bmahs-mcp-gateway[http]"(pipx 同理)。要求 Python ≥ 3.10。
验证:bmahs-mcp --version 输出 bmahs-mcp 0.1.1。
快速开始
# 扫描局域网内的 BMAHS 设备
bmahs-mcp discover
# 联调:对设备执行一个动作(控制类动作自动 occupy → 执行 → release)
bmahs-mcp ctl 客厅灯 on
bmahs-mcp ctl 客厅灯 brightness --arg level=80
bmahs-mcp ctl 客厅灯 scene --arg name=cinema --ttl 600 # 指定占用租约 600 秒
bmahs-mcp ctl 客厅灯 on --no-release # 动作后保持占用(打印 token)
bmahs-mcp ctl 客厅灯 release --arg token=<占有时返回的 token> # 手动释放保持的占用
# 启动 MCP 网关(stdio,供 MCP 客户端连接;默认子命令)
bmahs-mcp serve
# 以 Streamable HTTP 共享模式启动(多客户端同时连接)
bmahs-mcp http --host 0.0.0.0 --port 9530 --token 换成你的令牌在 MCP 客户端(ZCode / Claude Desktop 等)中配置 stdio 接入:
{
"mcpServers": {
"bmahs": {
"command": "bmahs-mcp",
"args": ["serve"]
}
}
}HTTP 模式的端点为 http://<host>:9530/mcp;设置了 --token 后客户端须携带 Authorization: Bearer <token>。
重启客户端后,模型可见两类工具:7 个固定工具——bmahs_devices(列设备)、bmahs_refresh(重扫描)、bmahs_describe(读自述)、bmahs_occupy / bmahs_release(占用/释放)、bmahs_call(泛化调用)、bmahs_screenshot(ui 设备抓屏);以及每台设备的动态工具——<设备id>__<动作>(如 demo-light-001__brightness),参数说明来自设备自述。典型流程:bmahs_devices 选型 → 直接调动态工具(网关自动 occupy 并携带 token,默认 120 秒租约)→ 用完 bmahs_release;token 由网关代管并遮蔽,不进模型上下文。
常见问题
扫不到设备? 确认设备已上电且同网段、Windows 防火墙放行 UDP 5354 入站;多网卡机器用
BMAHS_MCAST_IF_V4指定网卡;跨网段/容器用BMAHS_STATIC_DEVICES=tcp://IP:端口静态表兜底。报「正被 xxx 占用」(occupied)? 设备独占中:
bmahs_devices看holder/until,等租约到期或请占用方bmahs_release;协议无强夺机制(防止两个模型打架)。HTTP 模式 401? 请求头须带
Authorization: Bearer <--token 设置的值>。stdio 模式没有输出? 正常:stdout 是 MCP 协议通道,日志全走 stderr(
BMAHS_LOG_LEVEL=debug调高)。
环境变量
变量 | 说明 |
| 网关在协议中的智能体 id(默认自动生成) |
| 静态设备表,如 |
|
|
| 自动占用策略与租约上限 |
| 调用超时、设备表刷新与过期时间 |
| HTTP 模式默认参数 |
| 日志级别(日志一律走 stderr,不污染 stdio 协议通道) |
协议
BMAHS 协议要点:UDP 组播一报文一 JSON(≤1400 字节)负责发现,TCP 一行 JSON + \n 负责控制,连接后先读设备 hello;网关在协议中承担「智能体」角色。完整协议文档见 docs/BMAHS.md。
本地开发与构建
uv sync # 安装依赖(含 dev 组)
uv build # 在本目录构建 wheel + sdist(注意在包目录内执行并加 --out-dir dist)
uv publish # 发布到 PyPI(需配置 token)
uv run pytest # 运行测试License
Available Tools
7 toolsbmahs_callA
对 BMAHS 设备执行任意其操作清单内(operations)的动作,参数按该动作的 args 传。适合调用尚未生成独立工具的动作,或临时查看新设备。
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | 动作参数(按该设备 operations 中该动作 args 的字段名与类型) | |
| action | Yes | 动作名,必须在设备 operations 清单中 | |
| device | Yes | 设备 id 或显示名 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description carries the full safety burden. It discloses that any operation can be invoked, but does not warn about possible side effects, mutation, device-state requirements, or the need to call bmahs_describe/bmahs_occupy before executing. For a generic arbitrary-action tool this is a significant transparency gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences: the first front-loads the core behavior, the second clarifies the intended use cases. No filler or redundant restatement of the tool name.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description provides the essential call pattern and use cases for a generic dispatcher, but it does not explain how to discover the operations list, what the response looks like, or whether actions can mutate device state. With no output schema and no annotations, these are meaningful gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The tool description adds the useful idea that args must match the selected action's definition, but the schema property descriptions already state this; the description adds little beyond that.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific action: execute any operation in the device's operations list, and explicitly positions it as the fallback for operations that do not have a dedicated tool. This clearly distinguishes it from specialized siblings like bmahs_screenshot or bmahs_describe.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives concrete when-to-use guidance: for actions without a standalone tool or for temporarily inspecting a new device. The '尚未生成独立工具' condition implies preference for dedicated tools when available, though it does not name specific alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
bmahs_describeARead-only
读取某台 BMAHS 设备的完整操作清单(operations)、安全边界(security)与自然语言自述。
| Name | Required | Description | Default |
|---|---|---|---|
| device | Yes | 设备 id 或显示名 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The readOnlyHint annotation already signals a safe read operation, and the description is consistent with that by saying '读取'. The description adds useful context about what the tool returns (operations, security, self-description), but it does not disclose additional behavioral details such as error conditions or whether missing devices produce failures.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, compact sentence with no filler. It front-loads the action and resource before listing the returned content, making it immediately scannable and information-dense.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter read-only introspection tool, the description adequately conveys what the tool returns. There is no output schema, so the description's enumeration of operations, security, and self-description partially compensates, though it could mention what 'security' means or how failures are surfaced.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already documents the single parameter 'device' as '设备 id 或显示名' with 100% coverage, so the description needs to add little. The description's reference to '某台 BMAHS 设备' aligns with the schema but adds no new semantic detail about formats or constraints.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('读取', read) with a specific resource ('某台 BMAHS 设备') and clearly enumerates the returned content: operations, security boundaries, and natural-language self-description. This distinguishes it from action-oriented siblings like bmahs_call and bmahs_occupy.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives no explicit guidance on when to use this tool versus its siblings. It does not name alternatives or state conditions such as 'use before calling bmahs_call' or 'use to inspect device capabilities', leaving the agent to infer usage from the word 'describe'.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
bmahs_devicesARead-only
列出当前发现的全部 BMAHS 设备(id、显示名、自然语言自述、类型、状态、占用方与连接地址)。选设备、查占用状态时先用这个工具。
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | 按品类过滤(可选),如 light、display |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The annotations already include readOnlyHint: true, so the agent knows this is a safe read operation. The description adds value by listing the fields returned (id, display name, natural language description, type, status, occupant, connection address), which is useful context. However, it does not disclose any behavioral caveats such as pagination, performance, or data freshness, which would be relevant for a list tool. With annotations covering the safety profile, a 3 is appropriate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two concise sentences with no fluff. It front-loads the primary action and return fields, then gives a clear usage directive. Every sentence earns its place, and the structure is efficient and scannable.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple list tool with no output schema, the description adequately covers what the tool does, what it returns, and when to use it. It includes the key fields and the usage context. It does not address edge cases like empty results or the need to refresh the discovery list, but given the presence of a bmahs_refresh sibling, the 'currently discovered' phrasing implies current state. Overall, it is complete enough for an agent to invoke correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, meaning the 'type' parameter is fully documented in the schema with its purpose (filter by category) and examples (light, display). The tool description does not add any additional meaning about the parameter; it does not even mention filtering. Since the schema already provides complete parameter semantics, the baseline of 3 is maintained.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: '列出当前发现的全部 BMAHS 设备' (list all discovered BMAHS devices) and enumerates the returned fields (id, display name, description, type, status, occupant, address). It differentiates from siblings by positioning itself as the 'first' tool for device selection and occupancy checks, distinguishing it from more specific operations like occupy, release, or describe.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It provides explicit usage guidance: '选设备、查占用状态时先用这个工具' (use this tool first when selecting a device or checking occupancy status). This tells the agent when to start, but it does not explicitly name alternative tools or state when not to use it. The guidance is clear and action-oriented, though it lacks the explicit sibling differentiation seen in the highest example.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
bmahs_occupyA
独占占用一台 BMAHS 设备(返回的 token 由网关保存并自动携带)。租约由网关强制为有限时长:不带 ttl 默认 120 秒(2 分钟),请求值超过上限(默认 3600 秒)会被截断,不支持无限期占用。租约到期设备自动收回占用权;任务结束也可调用 bmahs_release 提前释放。
| Name | Required | Description | Default |
|---|---|---|---|
| ttl | No | 租约秒数(默认 120=2 分钟;超过上限会被截断) | |
| device | Yes | 设备 id 或显示名 |
TDQS
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, and it delivers: token persistence, gateway-managed lease enforcement, default TTL, upper-limit truncation, prohibition of indefinite leases, automatic reclamation on expiry, and manual release via bmahs_release. This is strong behavioral transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three dense sentences, each earning its place. The main purpose is front-loaded, followed by lease constraints and the release alternative. No filler or redundant restatement of the schema is present.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description is nearly complete for a lease-acquisition tool: it covers default behavior, limits, automatic expiry, token handling, and release. It does not specify what happens if the device is already occupied or whether occupancy is blocked or queued, a small but relevant gap for an exclusive-occupancy tool. No output schema exists, but the token handling is disclosed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3, but the description adds meaningful semantics beyond the schema: it clarifies that omitting ttl defaults to 120 seconds, that values beyond the default server cap of 3600 seconds are truncated, and that infinite leases are unsupported. This goes beyond the schema's field-level text.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a precise action and resource: '独占占用一台 BMAHS 设备' (exclusively occupy one BMAHS device). It clearly identifies the tool's core purpose and distinguishes it from the release sibling by explicitly naming bmahs_release as the early-release counterpart.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives clear operational context: leases are finite, default to 120 seconds, get truncated at the upper limit, and auto-expire. It also routes the agent to bmahs_release when the task ends. It does not explicitly state when not to use this tool versus bmahs_call or bmahs_screenshot, so it stops short of a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
bmahs_refreshARead-only
重新扫描 BMAHS 设备:发送组播 query 并刷新各设备的自述(hello)。当设备列表为空、新设备刚上电、或怀疑列表过期时调用。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations declare readOnlyHint=true, which the description does not contradict—refreshing is a read-like operation that updates a cached view. The description adds context beyond the annotation by specifying the mechanism (multicast query) and the effect (refresh self-descriptions), giving the agent a better mental model of what happens. It does not detail potential side effects like network traffic or latency, but given the read-only hint, this is acceptable.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences with no fluff. The first sentence states the action and mechanism; the second lists the usage triggers. The most important information (what it does) is front-loaded, and every clause earns its place. It is compact yet comprehensive for a zero-parameter tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (no parameters, no output schema, read-only annotation), the description covers the essential aspects: what it does, how it works, and when to call it. It does not describe the return value or post-refresh behavior, but since no output schema exists, this is not a critical gap. It is complete enough for an agent to invoke correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the input schema is trivial (coverage 100%). The description does not need to explain parameter semantics, and the absence of parameters makes this dimension a non-issue. The baseline of 4 applies because there is nothing to document; the description correctly stays focused on the operation itself.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('重新扫描' / rescan) and the resource (BMAHS devices), and explains it sends a multicast query to refresh each device's self-description. This distinguishes it from sibling tools like bmahs_devices (likely listing devices) and bmahs_describe (describing a device), as it focuses on refreshing the device list rather than retrieving or modifying specific entries.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit conditions for when to invoke the tool: when the device list is empty, a new device has just powered on, or the list is suspected to be stale. These clear triggers guide an agent to choose this tool over siblings, which have different purposes (e.g., bmahs_occupy/release for device control, bmahs_call/screenshot for device interaction).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
bmahs_releaseA
释放对某台 BMAHS 设备的占用。任务结束、失败或取消后必须调用,否则其它智能体会一直收到「被占用」。
| Name | Required | Description | Default |
|---|---|---|---|
| device | Yes | 设备 id 或显示名 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full behavioral burden. It discloses the state mutation (releasing occupancy) and the system-level consequence of skipping the call: "否则其它智能体会一直收到「被占用」" (otherwise other agents will keep receiving 'occupied'). This reveals the locking semantics of the occupancy model. It does not cover idempotency or error behavior on double-release, but the critical behavioral traits are present.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two dense sentences with zero filler. The first states the operation, the second gives the mandatory call-condition and the failure consequence. Every clause earns its place, and the core purpose is front-loaded in the first sentence.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-parameter, no-output-schema tool, the description is nearly complete: it covers what the tool does, when it must be called, and the consequence of not calling. Minor gaps are the lack of return-value information and double-release behavior, but an agent has what it needs to invoke the tool correctly at the right time.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% — the schema already documents `device` as "设备 id 或显示名" (device id or display name). The description adds no parameter-level detail beyond referring to "某台 BMAHS 设备" (a certain BMAHS device), which does not exceed what the schema already provides. Baseline 3 applies since the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: "释放对某台 BMAHS 设备的占用" (release the occupancy of a BMAHS device). It clearly identifies the inverse of the sibling bmahs_occupy without needing to open any schema, and is distinct from the listing, refresh, describe, call, and screenshot siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives explicit call timing: "任务结束、失败或取消后必须调用" (must be called after the task ends, fails, or is cancelled), telling the agent exactly when to invoke it. It also explains the consequence of omission — other agents keep seeing the device as occupied — which reinforces the condition. It stops short of explicitly naming the alternative (bmahs_occupy), but the when-condition is unambiguous.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
bmahs_screenshotA
(实验)对声明了 ui 能力的 BMAHS 设备抓取一帧当前画面:自动 ui.start → 二进制流取一帧 JPEG → ui.stop,返回图片与保存路径。
| Name | Required | Description | Default |
|---|---|---|---|
| device | Yes | 设备 id 或显示名 | |
| max_width | No | 期望画面最大宽度(像素),设备按自身能力缩放 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the behavioral burden. It discloses the full operational sequence: automatic ui.start, JPEG frame capture from binary stream, and ui.stop, plus the return value. This goes beyond the schema and gives the agent a realistic model of side effects, though it does not discuss failure modes or permissions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The entire tool behavior, precondition, workflow, and return value are packed into one efficient sentence with no filler. The purpose is front-loaded and the lifecycle detail is presented in a clear, compact sequence.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple 2-parameter tool with no output schema, the description covers the key return value (image and saved path), the precondition (UI capability), and the operational flow. It is slightly vague about the exact image representation (binary vs base64) but is otherwise sufficient for invoking the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the parameters are already documented in the input schema. The description does not add meaningful semantics beyond stating the screenshot purpose; max_width's scaling behavior is already described in the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb and resource: '对声明了 ui 能力的 BMAHS 设备抓取一帧当前画面' clearly states it captures a screenshot frame from UI-capable BMAHS devices. It also mentions the output (image and saved path), distinguishing it from siblings like bmahs_devices and bmahs_call.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context by restricting use to devices that declare UI capability and by outlining the automated ui.start → capture → ui.stop flow. It does not explicitly name alternatives or exclusion cases, but the precondition plus the very distinct purpose makes intended usage clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
7 tool updates
v0.1.0- First observed
bmahs_call - First observed
bmahs_describe - First observed
bmahs_devices - First observed
bmahs_occupy - First observed
bmahs_refresh - First observed
bmahs_release - First observed
bmahs_screenshot
TDQS
Scored across 7 tools
每个工具都有明确且不重叠的职责:列表、刷新、描述、占用、释放、通用调用和截图,描述清晰,不存在混淆风险。
所有工具均以 bmahs_ 前缀,采用动词形式(devices, refresh, describe, occupy, release, call, screenshot),模式统一,一致性好。
7 个工具覆盖设备发现、生命周期管理和操作执行,没有冗余,每个工具都必要,规模恰当。
覆盖了设备的发现、扫描、描述、占用/释放、操作调用和截图,但缺少如设备配置更新或批量操作等功能,不过对网关场景而言已基本完整。
Related MCP Connectors
Flash and run real firmware on physical embedded dev boards from an AI agent, over MCP.
1Live index of AI agents, MCP servers and tools with observed liveness and capability search.
Automate 1,000+ services from any MCP-compatible AI agent: build Applets, run actions and queries.
- ZapierOAuthcom.zapier
Hosted MCP server connecting AI assistants to 9,000+ apps and 40,000+ actions via Zapier.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to control Home Assistant smart home devices via MCP, with zero external dependencies. Supports calling services, getting states, and looking up service parameters.17 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables cloud LLM agents to discover and invoke physical hardware on edge and IoT devices through standard MCP tools, bridging constrained device channels like UART, BLE, and Wi-Fi.3MIT
- AlicenseAqualityBmaintenanceEnables AI agents to discover, monitor, and control industrial hardware like ESP32 machine controllers and inspection cameras through a standardized MCP interface.5MIT
- AlicenseBqualityBmaintenanceProvides a unified MCP interface for smart home automation, enabling device discovery, state management, energy optimization, and policy-aware plan validation across multiple home automation protocols.20Mozilla Public 2.0