Skip to content

files

Files and workflowsFull

The file steps workflows chain, inside the library's reach: a source is a library item or a file in SuperCapture's temp folder ({temp_dir} in a workflow), and a destination an approved folder (Settings → AI MCP Info) or the temp folder. Replacing a file outside the temp folder asks the user first.

Needs the Full level, which is the default for any client holding the bearer token.

Parameters

NameTypeRequiredDescription
actionstring one of "copy", "move", "delete", "format_name"yesWhat to do. copy: Copy a library item's file (id, or path: its path or name) or a file in SuperCapture's temp folder (path) into destination_dir, an approved folder or the temp folder, made if missing. A name taken gets ' (1)' unless overwrite. (id, path, destination_dir, filename, overwrite) move: Move a file in SuperCapture's temp folder (path) into destination_dir. Only temp files: a library item is copied, and trashed with library_edit if it should go. (path, destination_dir, filename, overwrite) delete: Delete a file in SuperCapture's temp folder (path); a missing one is no error (deleted false). (path) format_name: Fill a template's {token}s from tokens and return it (name); an unknown token is empty. (template, tokens)
idstringnocopy: the library item to copy.
pathstringnocopy: or an item's path or name, or a temp file. move, delete: a file in the temp folder.
destination_dirstringnocopy, move: the folder to put it in (~ is the home folder).
filenamestringnocopy, move: a new file name (no folders); default the source's.
overwritebooleannocopy, move: replace a file already there instead of adding ' (1)' (default false).
templatestringnoformat_name: text with {token}s.
tokensobjectnoformat_name: token name to its text.

Example

A JSON-RPC call to POST http://localhost:21516/mcp with the bearer token, filling in the required parameters:

{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "files",
"arguments": {
"action": "copy"
}
}
}

See the MCP server overview for how to connect a client and where the token lives.