Skip to main content
Glama

mv

Move or rename files and directories within virtual filesystem workspaces to organize content and manage storage across multiple providers.

Instructions

Move/rename file or directory.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYes
destYes

Implementation Reference

  • Core implementation of the mv tool logic: resolves paths using workspace_manager and delegates the move operation to the underlying VFS, returning a MoveResponse.
    async def mv(self, source: str, dest: str) -> MoveResponse:
        """
        Move/rename file or directory.
    
        Args:
            source: Source path
            dest: Destination path
    
        Returns:
            MoveResponse with success status
        """
        vfs = self.workspace_manager.get_current_vfs()
        resolved_source = self.workspace_manager.resolve_path(source)
        resolved_dest = self.workspace_manager.resolve_path(dest)
    
        await vfs.mv(resolved_source, resolved_dest)
    
        return MoveResponse(success=True, source=resolved_source, dest=resolved_dest)
  • MCP tool registration for 'mv': thin wrapper that delegates to VFSTools.mv instance.
    @server.tool
    async def mv(source: str, dest: str):
        """Move/rename file or directory."""
        return await vfs_tools.mv(source, dest)
  • Pydantic model defining the output schema for the mv tool response.
    class MoveResponse(BaseModel):
        """Response from mv operation"""
    
        success: bool
        source: str
        dest: str

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/chrishayuk/chuk-mcp-vfs'

If you have feedback or need assistance with the MCP directory API, please join our Discord server