upload_attachment
Upload files to Pega as temporary attachments for case linking, supporting local paths, base64 content, or URLs. Attachments auto-expire in 2 hours if unlinked, ensuring efficient file management across clients.
Instructions
Upload a file to Pega as a temporary attachment that can later be linked to cases. Creates a temporary attachment instance that auto-expires after 2 hours if not linked. Supports multiple input methods for cross-client compatibility.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
appendUniqueIdToFileName | No | Whether to append a unique identifier to the filename to prevent naming conflicts. Pega will add timestamp-based unique ID to filename. | |
fileContent | No | Base64-encoded file content (for web clients or when file system access is restricted). Use this when filePath is not available. | |
fileName | No | Original filename with extension (required when using fileContent or fileUrl). Example: "report.pdf", "image.jpg" | |
filePath | No | Path to file on local filesystem (preferred for desktop clients like Cline). Example: "/home/user/document.pdf" or "C:\Users\user\file.txt" | |
fileUrl | No | URL to file that can be fetched (http://, https://, file://, data:// schemes). Alternative when direct file access is not possible. | |
mimeType | No | MIME type override (auto-detected from filename/content if not provided). Example: "application/pdf", "image/jpeg" |
Input Schema (JSON Schema)
{
"properties": {
"appendUniqueIdToFileName": {
"default": true,
"description": "Whether to append a unique identifier to the filename to prevent naming conflicts. Pega will add timestamp-based unique ID to filename.",
"type": "boolean"
},
"fileContent": {
"description": "Base64-encoded file content (for web clients or when file system access is restricted). Use this when filePath is not available.",
"type": "string"
},
"fileName": {
"description": "Original filename with extension (required when using fileContent or fileUrl). Example: \"report.pdf\", \"image.jpg\"",
"type": "string"
},
"filePath": {
"description": "Path to file on local filesystem (preferred for desktop clients like Cline). Example: \"/home/user/document.pdf\" or \"C:\\Users\\user\\file.txt\"",
"type": "string"
},
"fileUrl": {
"description": "URL to file that can be fetched (http://, https://, file://, data:// schemes). Alternative when direct file access is not possible.",
"type": "string"
},
"mimeType": {
"description": "MIME type override (auto-detected from filename/content if not provided). Example: \"application/pdf\", \"image/jpeg\"",
"type": "string"
}
},
"type": "object"
}