gitlab_add_issue_comment
Add a comment to a GitLab issue, optionally generating it automatically from the files changed in a linked merge request.
Instructions
Create issue note/comment. Supports direct body or auto-generation from MR changed files (by MR IID or source branch).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | No | GitLab project ID. Omit this field unless the user explicitly provided a value. When omitted, the current runtime config value is used (WORKFLOW_ISSUE_PROJECT_ID overrides the built-in default when configured). If the runtime config is still unset, the tool returns a missing-parameter error. Do not infer or auto-generate this value. | |
| issue_iid | No | Issue IID. | |
| body | No | Comment markdown body. If provided, auto-generation fields are ignored. | |
| auto_generate_from_mr_changes | No | When true and body is missing, generate comment from MR changed-file analysis. | |
| code_project_id | No | Code project ID used for MR lookup/changes when auto_generate_from_mr_changes=true. Omit this field unless the user explicitly provided a value. When omitted, the current runtime config value is used (WORKFLOW_CODE_PROJECT_ID overrides the built-in default when configured). If the runtime config is still unset, the tool returns a missing-parameter error. Do not infer or auto-generate this value. | |
| mr_iid | No | Optional MR IID for changed-file analysis. | |
| branch_name | No | Optional source branch for MR lookup when mr_iid is not provided. | |
| target_branch | No | Optional target branch filter while resolving MR by branch_name. | |
| local_repo_path | No | Optional local repo path used to detect current branch when branch_name is missing. | |
| include_issue_context | No | Whether generated comment includes compact issue requirement context. Default true. | |
| max_changed_files | No | Maximum number of changed files included in generated comment. Default 30. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Whether the tool call succeeded. | |
| tool | Yes | Tool name. | |
| data | No | Created GitLab issue note payload. | |
| error_type | No | Error type when ok=false. | |
| message | No | Error message when ok=false. |