Skip to content

feat(mcp): device group read tools#7719

Open
andypalmi wants to merge 1 commit into
feat/mcp-tools-shared-schemasfrom
feat/mcp-tools-device-groups-read
Open

feat(mcp): device group read tools#7719
andypalmi wants to merge 1 commit into
feat/mcp-tools-shared-schemasfrom
feat/mcp-tools-device-groups-read

Conversation

@andypalmi

Copy link
Copy Markdown
Contributor

Summary

Add Phase 1 read-only MCP tools for fleet device groups, per Story 5 sub-issue 5.6-a.

Tools added (forge/ee/lib/mcp/tools/deviceGroups.js):

  • platform_list_application_device_groupsGET /api/v1/applications/:applicationId/device-groups
  • platform_get_application_device_groupGET /api/v1/applications/:applicationId/device-groups/:groupId
  • platform_list_team_device_groupsGET /api/v1/teams/:teamId/device-groups

All three routes require the deviceGroups team feature; when disabled they return the platform's existing 404 gate response.

Scopes allow-listed for user:expert-mcp in forge/routes/auth/permissions.js:

  • application:device-group:list
  • application:device-group:read
  • team:device-group:list

Write, membership, settings, and delete tools are tracked separately in sub-issues 5.6-b/c and are not part of this PR.

Closes #7699

Test plan

  • eslint on changed files
  • Manual review of route mounts against forge/ee/routes/index.js, applicationDeviceGroups/index.js, teamDeviceGroups/index.js

@codecov

codecov Bot commented Jul 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.42%. Comparing base (103f9ae) to head (f462226).

Additional details and impacted files
@@                        Coverage Diff                        @@
##           feat/mcp-tools-shared-schemas    #7719      +/-   ##
=================================================================
+ Coverage                          75.41%   75.42%   +0.01%     
=================================================================
  Files                                426      427       +1     
  Lines                              22551    22565      +14     
  Branches                            5949     5949              
=================================================================
+ Hits                               17006    17020      +14     
  Misses                              5545     5545              
Flag Coverage Δ
backend 75.42% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@andypalmi andypalmi force-pushed the feat/mcp-tools-device-groups-read branch from 9420520 to 6d62562 Compare July 4, 2026 13:33
@andypalmi andypalmi linked an issue Jul 6, 2026 that may be closed by this pull request
@andypalmi andypalmi force-pushed the feat/mcp-tools-shared-schemas branch from 8bfb22e to 9742987 Compare July 6, 2026 13:13
@andypalmi andypalmi force-pushed the feat/mcp-tools-device-groups-read branch from 6d62562 to d1583af Compare July 6, 2026 16:38
Add read-only MCP tools to list application and team device groups, with unit and equivalence tests. Query-string building uses the shared appendQuery helper. Allow-list their scopes for the expert-mcp platform token.
@andypalmi andypalmi force-pushed the feat/mcp-tools-device-groups-read branch from d1583af to f462226 Compare July 6, 2026 22:01
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.

5.6-a Read tools (phase 1)

1 participant