Skip to content

feat(mcp): bill of materials read tools - #7724

Open
andypalmi wants to merge 3 commits into
mainfrom
feat/mcp-tools-observability-read
Open

feat(mcp): bill of materials read tools#7724
andypalmi wants to merge 3 commits into
mainfrom
feat/mcp-tools-observability-read

Conversation

@andypalmi

@andypalmi andypalmi commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Phase 1 read-only MCP tools for the bill of materials, in a new forge/ee/lib/mcp/tools/bom.js file:

  • platform_get_team_bom - GET /teams/:teamId/bom
  • platform_get_application_bom - GET /applications/:applicationId/bom

Both tools are readOnlyHint: true, destructiveHint: false. BOM is plan-gated on feature key bom (default disabled); the tools surface a clear "feature not enabled for this team" message instead of a bare error when the team's plan does not have the feature. Team BOM results are filtered to the applications the caller can access.

The audit-log, history, and resource-usage read tools are filed with the resource they describe (team audit log in teams.js, hosted instance audit log/history/resources in instances.js, remote instance audit log/history in devices.js, application audit-log export in applications.js), following the one-file-per-resource convention.

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

  • team:bom
  • application:bom

Closes #7676

Test plan

  • eslint passes on changed files
  • Tool definitions load without error (require sanity check)
  • CI

@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 76.18%. Comparing base (a8f760b) to head (d11a1f3).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7724   +/-   ##
=======================================
  Coverage   76.17%   76.18%           
=======================================
  Files         440      441    +1     
  Lines       23604    23612    +8     
  Branches     6285     6285           
=======================================
+ Hits        17981    17989    +8     
  Misses       5623     5623           
Flag Coverage Δ
backend 76.18% <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-observability-read branch from 16b0fea to 997d30a 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-observability-read branch from 997d30a to 880296b Compare July 6, 2026 16:38
@andypalmi
andypalmi force-pushed the feat/mcp-tools-observability-read branch from 880296b to 95b4963 Compare July 6, 2026 22:01
@andypalmi andypalmi changed the title feat(mcp): observability read tools feat(mcp): bill of materials read tools Jul 7, 2026
@andypalmi
andypalmi marked this pull request as draft July 30, 2026 08:21
@andypalmi
andypalmi force-pushed the feat/mcp-tools-shared-schemas branch from 103f9ae to 5773bdb Compare August 3, 2026 13:19
Add forge/ee/lib/mcp/schemas.js, a shared module of composable zod
fragments the platform read tools import instead of redefining entity-id
and pagination/search/sort/audit-log query fields in each tool file.

- entity-id params: teamId, applicationId, hostedInstanceId (UUID),
  remoteInstanceId, snapshotId
- query fragments composed per route by spreading only the params the
  backing finder honors: cursorParam/limitParam (basePagination),
  pageParam, searchQuery, sortParams, auditLogFilters
- appendQuery serialises a tool's supported params onto the request URL

The module lives one level above tools/ so the tool loader does not
register it as a tool module.

Closes #7669
@andypalmi
andypalmi force-pushed the feat/mcp-tools-shared-schemas branch from eae081f to e04360f Compare August 3, 2026 14:13
@andypalmi
andypalmi force-pushed the feat/mcp-tools-observability-read branch from a5b4257 to efa4e33 Compare August 3, 2026 15:27
@andypalmi
andypalmi requested a review from cstns August 3, 2026 15:47
@andypalmi andypalmi self-assigned this Aug 3, 2026
@andypalmi
andypalmi marked this pull request as ready for review August 3, 2026 15:47
Expose team and application bill-of-materials as read-only MCP tools.
@andypalmi
andypalmi force-pushed the feat/mcp-tools-observability-read branch from efa4e33 to c10c4ca Compare August 3, 2026 15:56
Base automatically changed from feat/mcp-tools-shared-schemas to main August 5, 2026 08:49
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.7 Bill of materials read tools

2 participants