create_issue_attachment
Upload a local file to a Gitea issue, securely storing it as an attachment with path restrictions and size limits.
Instructions
Upload a local file as an attachment on an issue by its index (multipart/form-data). file_path reads a LOCAL file from the machine running gitea-mcp — confirm with the user before uploading any file. The path is confined: it must resolve inside the server's working directory (or GITEA_UPLOAD_ROOT), pass a filename-extension allow-list, avoid sensitive locations (.git, .env*, keys), and stay under a 50 MiB cap. Optional name overrides the stored filename (defaults to the file's basename). Returns the created attachment including its id. RISK: instances can disable attachments (404) and cap upload size (oversized files fail 413/422).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Attachment name stored on the server (defaults to the file's basename) | |
| repo | No | Repository name (defaults to GITEA_DEFAULT_REPO) | |
| index | Yes | Issue number | |
| owner | No | Repository owner (defaults to GITEA_DEFAULT_OWNER) | |
| file_path | Yes | LOCAL path (on the machine running gitea-mcp) to the file to upload — confirm with the user first. Must resolve inside the upload root (server working directory or GITEA_UPLOAD_ROOT), pass the extension allow-list, avoid sensitive locations, and stay under the size cap |