upload_attachment
Upload a file to Redmine and get a token to attach it to an issue using create_issue or update_issue, enabling attachments in issue workflows.
Instructions
Upload a file to Redmine and get an upload token.
The returned token can be used to attach the file to an issue
using create_issue() or update_issue() with the 'uploads' parameter.
Args:
file_path: Absolute path to the file to upload
filename: Optional filename to use in Redmine (defaults to the file's basename)
Returns:
Dictionary containing:
- token: Upload token to use when attaching to an issue
- filename: The filename that will be used
Example:
# Step 1: Upload the file
result = upload_attachment("/path/to/report.pdf")
token = result["token"]
# Step 2: Attach to an issue
update_issue(
issue_id=123,
uploads=[{
"token": token,
"filename": "report.pdf",
"content_type": "application/pdf",
"description": "Monthly report"
}]
)
Note:
The caller is responsible for validating file_path to prevent
unauthorized file access.
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": {
"file_path": "<file_path>"
},
"name": "upload_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | No | ||
| file_path | Yes |