Contents

Move Library Item

library_move · Tools · Documents

Move a Library item into a folder, or to the unfiled items

Parameters

NameTypeRequiredDescription
identifierstringYesThe item's id (ULID) or slug, as library_list, library_search and library_get return them.
pathstring[]NoFolder path as an array of folder slugs or ids from the root, as library_list and every returned item give them, e.g. ['projects-ab12cd', 'q1-x9y8z7']; [] is the root. A folder's name is not a path segment. The folder to move the item into.
unfiledbooleanNotrue moves the item to The unfiled items, shown in the Library tree as the Other folder: files and documents that belong to no folder. Leave `path` out with it.

Move Library Item Tool#

library_move moves a Library item into a folder, or out of every folder to the unfiled items (the Other folder).

When to Use#

The agent uses it to reorganize the Library tree.

Parameters#

Name exactly one of path and unfiled.

Parameter Type Required Description
identifier string Yes The item's id (ULID) or slug, as library_list, library_search and library_get return them
path string[] No Folder path as folder slugs or ids from the root to move the item into; [] is the root. Every folder must already exist
unfiled boolean No true moves the item to the unfiled items

Returns#

Field Type Description
item object The item: id, slug, name, kind (document, folder or file), path (folder slugs; null when unfiled), path_names, icon, color, ai_access_policy, revision, created_at, updated_at, url; a file adds object_id, media_kind, content_type, filename, size_bytes

url is the item's link. The agent gives it to the user when it reports the change, labelled with the item's name rather than its folder path.

Example Scenario#

{ "identifier": "q1-research-notes-ab12cd", "path": ["projects-ab12cd", "archive-x9y8z7"] }

Notes#

  • Naming both, or neither, is refused
  • The target folders must exist
  • A folder moves with everything in it and can't be unfiled; a temporary file can't enter a folder
  • An unknown or trashed identifier is refused with Library item not found: <identifier>
  • Refused when the item's AI access policy denies reads or writes: AI access denied: this resource is not writable by AI tools. (or not readable)
  • Risk: write