Skip to main content
Create a new file with the specified content. Fails if the file already exists.

Tool details

FieldValue
Namecreate_file
GroupFiles

Playground

Input schema

Input schema
{
  "type": "object",
  "properties": {
    "project_reference": {
      "type": "string",
      "description": "Project ID or slug"
    },
    "branch_id": {
      "type": "string",
      "description": "Branch ID (omit for main branch)"
    },
    "path": {
      "type": "string",
      "description": "File path (e.g., pages/about.mdx)"
    },
    "content": {
      "type": "string",
      "description": "File content"
    },
    "content_type": {
      "type": "string",
      "description": "MIME type (auto-detected if omitted)"
    }
  },
  "required": [
    "project_reference",
    "path",
    "content"
  ],
  "additionalProperties": false,
  "description": "Input schema for the create_file tool.",
  "$schema": "http://json-schema.org/draft-07/schema#"
}

Output schema

Output schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier for the returned record."
    },
    "path": {
      "type": "string",
      "description": "The path associated with this tool result."
    }
  },
  "required": [
    "path"
  ],
  "additionalProperties": false,
  "description": "Structured result returned by the create_file tool.",
  "$schema": "http://json-schema.org/draft-07/schema#"
}