Files Tools
Tools for uploading, downloading, and managing files.
Available Tools
files_listList user files. Optional params: folderId (filter by folder, use "root" for root level), conversationId, sortBy ("uploadedAt", "size", "fileName"), sortOrder ("asc", "desc"), limit, offset. Returns {files[], total}.
Input Schema
conversationId | string | Filter by conversation ID |
folderId | string | Filter by folder ID. Use "root" for root level |
sortBy | string | Sort field: "uploadedAt", "size", or "fileName" |
sortOrder | string | Sort order: "asc" or "desc" |
limit | number | Max files to return (1-100, default: 50) |
offset | number | Number of files to skip for pagination |
Example Call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "files_list",
"arguments": {
"conversationId": "example",
"folderId": "example",
"sortBy": "example"
}
}
}files_getGet a specific file by ID
Input Schema
fileId | stringrequired | File ID from list |
Example Call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "files_get",
"arguments": {
"fileId": "example"
}
}
}files_getDownloadUrlGet a presigned download URL for a file (1 hour expiry)
Input Schema
fileId | stringrequired | File ID from list |
Example Call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "files_getDownloadUrl",
"arguments": {
"fileId": "example"
}
}
}files_deleteDelete a file (move to trash)
Input Schema
fileId | stringrequired | File ID to delete |
Example Call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "files_delete",
"arguments": {
"fileId": "example"
}
}
}files_renameRename a file
Input Schema
fileId | stringrequired | File ID to rename |
newName | stringrequired | New file name |
Example Call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "files_rename",
"arguments": {
"fileId": "example",
"newName": "example"
}
}
}files_moveMove a file to a different folder
Input Schema
fileId | stringrequired | File ID to move |
folderId | stringrequired | Target folder ID, or null for root |
Example Call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "files_move",
"arguments": {
"fileId": "example",
"folderId": "example"
}
}
}files_listFoldersList folders. Optional param "parentId" (null for root level folders). Returns array with id, name, parentId.
Input Schema
parentId | string | Parent folder ID, or null for root level |
Example Call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "files_listFolders",
"arguments": {
"parentId": "example"
}
}
}files_createFolderCreate a new folder
Input Schema
name | stringrequired | Folder name |
parentId | string | Parent folder ID, or null for root |
Example Call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "files_createFolder",
"arguments": {
"name": "example",
"parentId": "example"
}
}
}files_renameFolderRename a folder
Input Schema
folderId | stringrequired | Folder ID to rename |
newName | stringrequired | New folder name |
Example Call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "files_renameFolder",
"arguments": {
"folderId": "example",
"newName": "example"
}
}
}files_deleteFolderDelete an empty folder
Input Schema
folderId | stringrequired | Folder ID to delete. Folder must be empty. |
Example Call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "files_deleteFolder",
"arguments": {
"folderId": "example"
}
}
}files_getUsageGet storage stats. No params. Returns {totalSize (bytes), fileCount}.
Example Call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "files_getUsage",
"arguments": {}
}
}