sn_attachment_upload
Upload a local file and attach it to a specified ServiceNow record by table and sys_id, with write access required.
Instructions
Upload a local file and attach it to a ServiceNow record. This is a write tool. It refuses to run unless the server was started with SN_ALLOW_WRITE=1.
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": {
"table": "<table>",
"sys_id": "<sys_id>",
"file_path": "<file_path>"
},
"name": "sn_attachment_upload"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | Table of the record to attach the file to. Example: incident. | |
| sys_id | Yes | The sys_id of the record to attach the file to: 32 hex characters. | |
| file_name | No | Name to give the attachment. Default: the name of the local file. | |
| file_path | Yes | Absolute local path of the file to upload. | |
| content_type | No | MIME type of the file. Default: guessed from the file extension. |