file_unlink
tools/call
Remove an attachment; the file stays in Files. With deleteUploadedFile: true it is deleted too when it was uploaded straight into that item, nothing else uses it and this key uploaded it (fileDeleted says so).
Scopes
link:files
The target entity's read scopes apply too: a task needs read:projects; a memory needs read:memory, and read:agent_sessions when it was recorded from an agent session; a document follows its owner's document scopes; a skill is the connection owner's own personal skill and needs read:skills; briefings and written briefings are attached by their author in Specify. Unless the agent manages the file or created the link, it also needs the scopes to link the entity: write:projects for a task, curate:memory (or contribute:memory on your own proposal) for a memory, write:skills for a skill. Without them the entity reads as NOT_FOUND. The file stays in Files. With deleteUploadedFile: true, a file this connection uploaded straight into that item that nothing else uses is deleted too, and the answer says fileDeleted: true; a file someone else uploaded is only detached. A file tied to a Design item (a capture or a revision preview) also needs read:design and sight of the item; without them it is left out or reads as NOT_FOUND.
Inputs
- accountIdstringRequired
- serviceTenancyIdstringRequired
- expectedAuthorizationVersionstring
- idstringRequired
- expectedVersionintegerRequired
- idempotencyKeystringRequired
- deleteUploadedFileboolean
- targetobjectRequired
Returns
The file link view. A call returns content[0].text with the JSON result and structuredContent.result with the same value.
Listed when
The connection holds the tool's Files scope.