Write

A built-in definition supplied to the request when the tools option was omitted.

Captured description

Writes a file to the local filesystem, overwriting if one exists.

When to use: creating a new file, or fully replacing one you’ve already Read. Overwriting an existing file you haven’t Read will fail. For partial changes, use Edit instead.

Input schema

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "file_path": {
      "description": "The absolute path to the file to write (must be absolute, not relative)",
      "type": "string"
    },
    "content": {
      "description": "The content to write to the file",
      "type": "string"
    }
  },
  "required": [
    "file_path",
    "content"
  ],
  "additionalProperties": false
}

Independent estimate

~222 tokens

The captured tool object was counted against the common baseline. This value supports comparison and is not additive.