upload_attachment
Attach a file to a ServiceNow record via source_url (recommended) or base64 content. Use source_url for large files; base64 only for small files.
Instructions
Attach a file to a ServiceNow record (requires WRITE_ENABLED=true). Provide EITHER source_url (recommended) OR content_base64. source_url has the server fetch the file directly, so large files never pass through this tool call; content_base64 is only reliable for small files (a few hundred KB) and is rejected above ~4MB.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | Table name (e.g. "incident", "kb_knowledge") | |
| file_name | Yes | File name including extension (e.g. "screenshot.png") | |
| source_url | No | PREFERRED. http(s) URL the server fetches the file from and attaches directly. Use this for anything larger than a few hundred KB. Bytes never travel through this tool call. | |
| content_type | No | MIME type (e.g. "image/png", "application/pdf"). Optional when source_url is used (inferred from the response or file extension). | |
| record_sys_id | Yes | sys_id of the record to attach the file to | |
| content_base64 | No | Base64-encoded file content. Only for small files. Use source_url for anything larger. | |
| source_auth_header | No | Optional Authorization header value sent when fetching source_url (e.g. "Bearer <token>" or "Basic <creds>") for any protected URL that requires authentication. |