Upload a release asset
upload_release_assetUpload a local file as a Forgejo release asset using release_id and file_path; write mode is required, and the file must resolve inside FORGEJO_UPLOAD_ROOT.
Instructions
Upload a local file as a release asset (requires write mode). Give release_id and file_path; the published name defaults to the file's own. The file must resolve inside the server's FORGEJO_UPLOAD_ROOT — uploads are refused outright when that is unset, since whatever is read becomes publicly downloadable. Forgejo keeps same-named assets side by side, so delete the old one first when replacing.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"owner": "<owner>",
"repo": "<repo>",
"release_id": "<release_id>",
"file_path": "<file_path>"
},
"name": "upload_release_asset"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Published filename. Defaults to the file's own name. | |
| repo | Yes | Repository name. | |
| owner | Yes | Repository owner. | |
| file_path | Yes | Path to the local file to upload. Must resolve to a regular file inside the server's configured `FORGEJO_UPLOAD_ROOT`. | |
| release_id | Yes | Release id to attach the file to. |