Agent tools

move

move({ from, to })

Move or rename a file or folder inside the workspace. It never overwrites.

category: writenever overwritesfiles and folders
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

fromstringrequired

What to move.

tostringrequired

Where. Parent folders are created.

A taken destination is a refusal

Nothing is replaced. The agent is told both paths and picks another name — far better than a file quietly replaced by one of the same name.

Renaming is the same call

A move within one folder is a rename. There is no second tool and no flag: the destination says everything.

A folder cannot go inside itself

Refused before anything moves, rather than failing halfway with part of the tree already elsewhere.