Create File
create_fileFull Description
Tool
Name: dropbox.create_file Purpose: Create a new file with text content in Dropbox. When to use: For creating text-oriented files from inline content only.
PATHS (SUPER IMPORTANT):
- Input path accepts fq_path or ns_path.
- Paths are case-insensitive.
- The final path component is the filename to create.
- Output file.path is always ns_path.
- Never strip the "ns:<id>//" prefix from returned paths.
- Team root is not writable for team accounts. Personal account root is writable.
- This tool only supports text-oriented files. Allowed extensions:
- .abap
- .ada
- .adp
- .ahk
- .as
- .as3
- .asc
- .ascx
- .asm
- .asp
- .aspx
- .awk
- .bash
- .bash_login
- .bash_logout
- .bash_profile
- .bashrc
- .bat
- .bib
- .bsh
- .build
- .builder
- .c
- .c++
- .capfile
- .cc
- .cfc
- .cfm
- .cfml
- .cl
- .clj
- .cls
- .cmake
- .cmd
- .coffee
- .cpp
- .cpt
- .cpy
- .cs
- .cshtml
- .cson
- .csproj
- .css
- .csv
- .ctp
- .cxx
- .d
- .ddl
- .di
- .dif
- .diff
- .disco
- .dml
- .dtd
- .dtml
- .el
- .emakefile
- .erb
- .erl
- .f
- .f90
- .f95
- .fs
- .fsi
- .fsscript
- .fsx
- .gemfile
- .gemspec
- .gitconfig
- .go
- .groovy
- .gry
- .gvy
- .h
- .h++
- .haml
- .handlebars
- .hbs
- .hcp
- .hh
- .hpp
- .hrl
- .hs
- .htc
- .htm
- .html
- .hxx
- .idl
- .iim
- .inc
- .inf
- .ini
- .inl
- .ipp
- .irbrc
- .jade
- .jav
- .java
- .js
- .json
- .jsp
- .jsx
- .l
- .less
- .lhs
- .lisp
- .log
- .lst
- .ltx
- .lua
- .m
- .make
- .markdn
- .markdown
- .md
- .mdown
- .mkdn
- .ml
- .mli
- .mll
- .mly
- .mm
- .mud
- .nfo
- .opml
- .org
- .osascript
- .out
- .p
- .pas
- .patch
- .php
- .php2
- .php3
- .php4
- .php5
- .phtml
- .pl
- .plist
- .pm
- .pod
- .pp
- .profile
- .properties
- .ps1
- .psd1
- .psm1
- .pt
- .py
- .pyw
- .r
- .rake
- .rb
- .rbx
- .rc
- .re
- .readme
- .reg
- .rest
- .resw
- .resx
- .rhtml
- .rjs
- .rprofile
- .rpy
- .rs
- .rss
- .rst
- .rxml
- .s
- .sass
- .scala
- .scm
- .sconscript
- .sconstruct
- .script
- .scss
- .sgml
- .sh
- .shtml
- .sml
- .sql
- .sty
- .swift
- .tcl
- .tex
- .text
- .textile
- .tld
- .tli
- .tmpl
- .tpl
- .tsx
- .txt
- .vb
- .vi
- .vim
- .wsdl
- .xhtml
- .xml
- .xoml
- .xsd
- .xsl
- .xslt
- .yaml
- .yaws
- .yml
- .zsh
REQUEST CONTRACT:
- path (string, REQUIRED): Full destination path including the filename.
- Parent must already exist.
- content (string, REQUIRED): UTF-8 text content. Maximum 5MB.
RESPONSE CONTRACT:
- file: object describing the created file.
- name, path, modified_time, file_id
- object_type: "file"
- file.size: File size in bytes.
- path_display: fq_path for human display when populated.
- When content is empty, current MCP serialization may omit file.size instead of returning 0. Treat an omitted size as a zero-byte file.
ASSISTANT POLICY:
- Before calling this tool, the assistant MUST summarize the exact mutation plan and get explicit user confirmation in chat.
- The assistant MUST NOT claim the mutation already happened until the tool returns a successful response.
- After a successful response, the assistant MUST clearly list exactly what changed, using returned paths, file IDs, status values, and URLs when available.
- If the response represents partial success, the assistant MUST separate the succeeded and failed parts explicitly. When both shared_with and share_errors are present, report each list separately.
- After a successful response, the assistant MUST tell the user how to revert the change. For created files or folders, instruct the user to delete them from Dropbox. For sharing changes, instruct the user to manage or revoke sharing from the Dropbox web UI.
ERRORS:
- INVALID_PATH: path is empty or missing name component
- INVALID_NAME: name contains \ (backslash)
- CONTENT_TOO_LARGE: content exceeds 5MB
- PARENT_NOT_FOUND: parent path doesn't exist
- PARENT_NOT_FOLDER: parent is not a folder
- ALREADY_EXISTS: file exists at target
- PERMISSION_DENIED: no write access
- TEAM_ROOT_NOT_WRITABLE: cannot create files or folders directly in team root
RETRY GUIDANCE:
- Do NOT retry on TEAM_ROOT_NOT_WRITABLE. Choose a specific folder path instead.
EXAMPLES:
{"path": "/Documents/notes.txt", "content": "Hello World"} {"path": "ns:123//Code/script.py", "content": "print('hi')"} {"path": "/readme.txt", "content": "Root level file"} Private shared link requirement: This tool always generates a private shared link. Once you share the link you will need to approve their access from inside dropbox.
Parameters (0 required, 2 optional)
contentstringpathstring