Skip to Content

Azure Files

Browse files and directories stored in Azure Files shares, read required files, or import them into file storage. If needed, you can create new directories, upload files created during work, replace existing files, or rename and move files and directories within the same share.

Key Features

  • List file shares in an Azure Storage account
  • Browse directories and files in a share
  • View file or directory metadata
  • Read text file content
  • Download PDF, Office documents, and binary files
  • Search files by part of the file name or path
  • Create a new directory under an existing directory
  • Upload files from file storage to an Azure Files share
  • Replace the contents of an existing file
  • Rename or move a file or directory within the same share

Basic Information

Authentication Method

Microsoft OAuth authentication is used.

Usage Scope

This MCP accesses Azure Files cloud storage. It is not used to browse or read the user’s local file system.

Supported MCP Tools

list_shares

Lists Azure Files shares accessible from the configured Azure Storage account. Use this first when the user has not specified a share name.

list_directory

Lists files and subdirectories under the specified share and directory path. Results may include name, path, type, and size information.

get_file_metadata

Retrieves metadata for a file or directory. Use this to check size and content type before reading or downloading file content.

read_file

Reads text file content stored in Azure Files directly in the chat response. Use download_file for binary files or large files.

download_file

Downloads a file from Azure Files into file storage and returns an aip-temp:// or aip-drive:// URI. Use this for PDF, Office documents, images, and binary files that are difficult to display directly in chat.

search_files

Searches Azure Files by strings included in file names or paths. Full-text content search is not supported. If the search range is too broad, narrow the path or search term and run it again.

create_directory

Creates a new directory under an existing parent directory in the specified share. It creates only one directory level at a time. If the parent directory does not exist, check where the directory should be created first. If the target directory already exists, it is treated as the existing directory instead of being created again.

upload_file

Uploads an AIP file URI created or imported from chat, a Skill, or another MCP tool as a new file in an existing directory of an Azure Files share. If a file with the same name already exists, the upload fails. Existing files are not overwritten and file names are not changed automatically.

replace_file

Replaces an existing file in its entirety with a file prepared in chat, a Skill, or another MCP tool. Use upload_file to create a new file.

  • The replacement file determines the file contents and content type.
  • Custom metadata and the SMB ACL of the existing file are preserved.
  • Directories cannot be replaced, and the target file must already exist.
  • Use this only when the user explicitly asks to replace or overwrite an existing file.

rename_item

Renames an existing file or directory, or moves it to another path within the same SMB File Share. For example, you can move reports/draft.md to archive/final.md.

  • The source and destination paths must be different.
  • The destination parent directory must already exist.
  • If a file or directory already exists at the destination path, the operation fails without overwriting it.
  • When the operation succeeds, the source path is no longer available.

Usage Examples

  • “Find the 2026 sales report in the reports share in Azure Files”
  • “Show me what files are in the /monthly folder of the finance share”
  • “Read the contents of summary.txt in Azure Files”
  • “Import the contract PDF as a file and summarize it”
  • “Create a 2026-08 folder under /monthly in the finance share”
  • “Upload the report I just created to the reports/2026 folder in Azure Files”
  • “Overwrite monthly/summary.xlsx in the finance share with the file I just updated”
  • “Move drafts/plan.md in the finance share to archives/2026/plan-final.md”

Notes

  • A Microsoft account with access to the Azure Storage account and Azure Files share is required.
  • read_file is suitable for text files. For PDF, Office documents, images, and large files, download the file first and process it with another tool or Skill.
  • search_files searches by file name and path, not by file body content.
  • create_directory does not create multiple folder levels at once. Create parent directories first if needed.
  • upload_file saves a new file into an existing Azure Files directory. It does not create the target directory automatically and does not overwrite existing files.
  • upload_file, replace_file, and rename_item currently support SMB Azure Files shares only. They cannot be used with NFS shares.
  • rename_item does not support moving files between File Shares. You can rename or move items only within the same share.
  • replace_file does not provide version management or protection against concurrent changes. If another user changes the destination after you prepare the replacement file, that change is overwritten. Download the latest destination file and prepare an updated replacement file before replacing it when you need to include the latest changes.
  • Uploading, replacing, or renaming files requires write permission in addition to read permission. If you were granted permission recently, reconnect Microsoft OAuth before trying again.
Last updated on