feat(mcp): pipeline read tools - #7715
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7715 +/- ##
==========================================
+ Coverage 75.94% 75.96% +0.01%
==========================================
Files 445 446 +1
Lines 23990 24003 +13
Branches 6404 6406 +2
==========================================
+ Hits 18220 18233 +13
Misses 5770 5770
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ef3162b to
31f4caf
Compare
8bfb22e to
9742987
Compare
8396005 to
e179669
Compare
103f9ae to
5773bdb
Compare
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
eae081f to
e04360f
Compare
e179669 to
7ad5d36
Compare
7ad5d36 to
94534c2
Compare
…owner Reword the platform_list_pipelines description to say team results include only the applications the caller can access, without referencing token scoping. Return a 400 when neither or both of teamId and applicationId are supplied, so the handler no longer builds an invalid /teams/undefined/pipelines URL.
Testing results of new toolsLocal platform context these calls ran against:
This PR adds 2 read tools to a new platform_list_pipelinesLists a team's or a single application's pipelines. The handler requires exactly one of
platform_get_pipeline_stageFetches one stage within a pipeline, including its target (hosted instance here) and snapshot action. Requires both
ConclusionBoth new tools in |
…nes-read # Conflicts: # forge/routes/auth/permissions.js
Summary
Adds Phase 1 read-only MCP tools for DevOps pipelines.
Tool file:
forge/ee/lib/mcp/tools/pipelines.jsTools added:
platform_list_pipelines- lists a team's or an application's pipelines; takes an optionalteamIdorapplicationId. WithapplicationIdit calls GET/api/v1/applications/:applicationId/pipelines, otherwise withteamIdit calls GET/api/v1/teams/:teamId/pipelines.platform_get_pipeline_stage- GET/api/v1/pipelines/:pipelineId/stages/:stageIdBoth tools carry
readOnlyHint: trueanddestructiveHint: false.Permissions:
#8185 removed the hardcoded
user:expert-mcpscope allow-list, so expert MCP tokens now inherit the user's permissions gated by team role and no allow-list entries are needed.Consolidation notes
The team and application pipeline list tools are combined into a single
platform_list_pipelinestaking eitherteamIdorapplicationId; both routes are unpaginated and share the same role, so one tool with an id argument is simpler for the agent.Closes #7696
Test plan