add_attachment
Attach a file or auto-zipped directory to a TestRail test case, run, or result for evidence and documentation. Supports uploads up to 256MB.
Instructions
Add an attachment to a test case, test run, or test result in TestRail. If the file_path points to a directory, it will be automatically zipped before uploading. Maximum upload size is 256MB.
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": {
"entity_type": "<entity_type>",
"entity_id": "<entity_id>",
"file_path": "<file_path>"
},
"name": "add_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entity_id | Yes | The ID of the entity to attach the file to (e.g. 123 or 'C123' for cases, or numeric run / result ID) | |
| file_path | Yes | The path to the file or directory to attach. Directories will be automatically zipped. | |
| entity_type | Yes | The type of entity to attach the file to ('case', 'run', or 'result') |