upload_file
Upload a file to a GitLab project and get the Markdown snippet to embed it in issues, MRs, or epics. Supports local file path or base64 data, with a dry-run preview mode.
Instructions
Upload a file to a project so it can be embedded in an issue, MR, or epic description. Returns the Markdown snippet GitLab expects (e.g. ). Provide exactly one of file_path (read from local disk) or file_base64 (inline data). dry_run=true by default.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | Project ID to upload to | |
| filename | Yes | Filename to register on GitLab (extension matters for image detection) | |
| file_path | No | Absolute path to a local file to upload | |
| file_base64 | No | Base64-encoded file content (alternative to file_path) | |
| dry_run | No | Dry run mode (default: true). When true, returns a preview of the action without executing it. Set to false only after user confirmation. |