@@ -5880,6 +5880,67 @@ async def unprotect_tag(
58805880 return response .data
58815881
58825882
5883+ # Prompts
5884+ @mcp .prompt
5885+ def create_branch_prompt (
5886+ new_branch : str ,
5887+ source_branch : str ,
5888+ project_id : Union [str , int ],
5889+ ) -> str :
5890+ """
5891+ Generates a prompt for creating a branch
5892+ """
5893+ return f"Create a branch called '{ new_branch } ' from the '{ source_branch } ' for project id { project_id } "
5894+
5895+
5896+ @mcp .prompt
5897+ def create_merge_request_prompt (
5898+ new_branch : str ,
5899+ source_branch : str ,
5900+ project_id : Union [str , int ],
5901+ title : str ,
5902+ description : str ,
5903+ ) -> str :
5904+ """
5905+ Generates a prompt for creating a merge request
5906+ """
5907+ return (
5908+ f"Create a new merge request for project id { project_id } from the '{ new_branch } ' to the '{ source_branch } ' "
5909+ f"with a title: '{ title } ' and a description: '{ description } '"
5910+ )
5911+
5912+
5913+ @mcp .prompt
5914+ def get_project_statistics_prompt (
5915+ project_id : Union [str , int ],
5916+ ) -> str :
5917+ """
5918+ Generates a prompt for getting project statistics
5919+ """
5920+ return f"What are the details for project id: { project_id } "
5921+
5922+
5923+ @mcp .prompt
5924+ def trigger_pipeline_prompt (
5925+ branch : str ,
5926+ project_id : Union [str , int ],
5927+ ) -> str :
5928+ """
5929+ Generates a prompt for triggering a pipeline
5930+ """
5931+ return f"Run the pipeline for project: '{ project_id } ' on the '{ branch } ' branch"
5932+
5933+
5934+ @mcp .prompt
5935+ def get_latest_release_prompt (
5936+ project_id : Union [str , int ],
5937+ ) -> str :
5938+ """
5939+ Generates a prompt for getting the latest gitlab release.
5940+ """
5941+ return f"What is the latest release for project id: { project_id } "
5942+
5943+
58835944def gitlab_mcp () -> None :
58845945 """Run the GitLab MCP server with specified transport and connection parameters.
58855946
0 commit comments