{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/FileBlock",
  "title": "FileBlock",
  "properties": {
    "value": {
      "type": "string",
      "title": "Value",
      "description": "Value of the block."
    },
    "limit": {
      "type": "integer",
      "title": "Limit",
      "description": "Character limit of the block.",
      "default": 100000
    },
    "project_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Project Id",
      "description": "The associated project id."
    },
    "template_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Template Name",
      "description": "Name of the block if it is a template."
    },
    "is_template": {
      "type": "boolean",
      "title": "Is Template",
      "description": "Whether the block is a template (e.g. saved human/persona options).",
      "default": false
    },
    "template_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Template Id",
      "description": "The id of the template."
    },
    "base_template_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Base Template Id",
      "description": "The base template id of the block."
    },
    "deployment_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Deployment Id",
      "description": "The id of the deployment."
    },
    "entity_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Entity Id",
      "description": "The id of the entity within the template."
    },
    "preserve_on_migration": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Preserve On Migration",
      "description": "Preserve the block on template migration.",
      "default": false
    },
    "label": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Label",
      "description": "Label of the block (e.g. 'human', 'persona') in the context window."
    },
    "read_only": {
      "type": "boolean",
      "title": "Read Only",
      "description": "Whether the agent has read-only access to the block.",
      "default": false
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Description",
      "description": "Description of the block."
    },
    "metadata": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Metadata",
      "description": "Metadata of the block.",
      "default": {}
    },
    "hidden": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Hidden",
      "description": "If set to True, the block will be hidden."
    },
    "id": {
      "type": "string",
      "pattern": "^block-[a-fA-F0-9]{8}",
      "title": "Id",
      "description": "The human-friendly ID of the Block",
      "examples": [
        "block-123e4567-e89b-12d3-a456-426614174000"
      ]
    },
    "created_by_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Created By Id",
      "description": "The id of the user that made this Block."
    },
    "last_updated_by_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Last Updated By Id",
      "description": "The id of the user that last updated this Block."
    },
    "tags": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Tags",
      "description": "The tags associated with the block.",
      "default": []
    },
    "file_id": {
      "type": "string",
      "title": "File Id",
      "description": "Unique identifier of the file."
    },
    "source_id": {
      "type": "string",
      "title": "Source Id",
      "description": "Deprecated: Use `folder_id` field instead. Unique identifier of the source.",
      "deprecated": true
    },
    "is_open": {
      "type": "boolean",
      "title": "Is Open",
      "description": "True if the agent currently has the file open."
    },
    "last_accessed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Last Accessed At",
      "description": "UTC timestamp of the agent\u2019s most recent access to this file. Any operations from the open, close, or search tools will update this field."
    }
  },
  "type": "object",
  "required": [
    "value",
    "file_id",
    "source_id",
    "is_open"
  ]
}