Skip to content

Limit IoT MCP server to registry tools - #448

Merged
DhavalRepo18 merged 7 commits into
mainfrom
add-asset-ids-assets-tools
Jul 14, 2026
Merged

DhavalRepo18 merged 7 commits into
mainfrom
add-asset-ids-assets-tools

Conversation

@ShuxinLin

@ShuxinLin ShuxinLin commented Jul 14, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • limit the IoT MCP server to registry discovery tools: sites, asset_ids, and assets
  • add sites() using the registry-backed site discovery pattern from the pinned upstream IoT server
  • make asset_ids() return only sorted assetnum values for a site
  • make assets() return compact registry metadata, with optional assettype filtering
  • improve MCP-visible docstrings using the FastMCP-style summary plus Args and successful-result Returns sections
  • use backend-neutral registry database wording in IoT tool docs and tool errors
  • remove _id, doctype, iot_asset_id, and wo_assetnum from src/couchdb/scenarios_data/shared/iot/asset_profile_sample.json
  • update tests, docs, ToolUniverse/OpenCode examples, and legacy workflow messaging for the new IoT tool surface

Tool Surface

  • sites() -> {"sites": [...]}
  • asset_ids(site_name) -> bare asset id list for the site
  • assets(site_name, assettype?) -> asset metadata rows: asset_id, description, assettype, vintage, n_sensors

Tests

  • .venv/bin/python -m pytest src/servers/iot/tests src/mcphub/tests (13 passed, 5 skipped; registry integrations skipped locally)
  • jq empty src/couchdb/scenarios_data/shared/iot/asset_profile_sample.json
  • .venv/bin/python -m py_compile src/servers/iot/main.py src/servers/iot/tests/test_tools.py src/mcphub/workflows.py src/mcphub/tests/test_workflows.py
  • MCP registry smoke check confirmed ['asset_ids', 'assets', 'sites']
  • MCP docstring smoke check confirmed FastMCP-style summary, Args, and successful-result Returns sections for the IoT tools

Signed-off-by: Shuxin Lin <linshuhsin@gmail.com>
Signed-off-by: Shuxin Lin <linshuhsin@gmail.com>
@ShuxinLin ShuxinLin changed the title Add IoT asset_ids and metadata assets tools Limit IoT MCP server to asset tools Jul 14, 2026
Signed-off-by: Shuxin Lin <linshuhsin@gmail.com>
@ShuxinLin ShuxinLin changed the title Limit IoT MCP server to asset tools Limit IoT MCP server to registry tools Jul 14, 2026
@ShuxinLin
ShuxinLin requested a review from DhavalRepo18 July 14, 2026 19:08
Signed-off-by: Shuxin Lin <linshuhsin@gmail.com>
Signed-off-by: Shuxin Lin <linshuhsin@gmail.com>
Signed-off-by: Shuxin Lin <linshuhsin@gmail.com>
Signed-off-by: Shuxin Lin <linshuhsin@gmail.com>

@DhavalRepo18 DhavalRepo18 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once all the Tools are in place in the IoT, I will make a clean review.

@DhavalRepo18
DhavalRepo18 merged commit 9d222e4 into main Jul 14, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants