Loading
Add merge_request_iid parameter to save_pipeline MCP tool
What does this MR do and why?
Consolidates merge request pipeline creation into the save_pipeline MCP tool (under the :ci toolset) per maintainer feedback, rather than introducing a separate tool in the :merge_requests toolset.
When merge_request_iid is provided to save_pipeline (and pipeline_id is absent), the tool delegates execution to MergeRequests::CreatePipelineService to create a pipeline properly linked to the merge request.
Changes
- Add
merge_request_iidinteger parameter toSavePipelineServiceschema. - Update
SavePipelineService#perform_v0_1_0to executeMergeRequests::CreatePipelineServicewhenmerge_request_iidis present. - Enforce mutual exclusion between
merge_request_iidandpipeline_id/ref/action. - Enforce granular token authorization on
create_merge_request_pipeline. - Add unit specs covering merge request pipeline creation, url identification, permissions, and validation errors.
- Document the new
merge_request_iidparameter indoc/user/model_context_protocol/mcp_server_tools.md.
Closes #604238 (closed)
Edited by Pavan Kumar Sadashiv