{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bridgetown-builders/json-schema/bridgetown-builders-post-api-models-modelname-data-sources-upload-sessions-request-schema.json",
  "title": "PostApiModelsModelnameDataSourcesUploadSessionsRequest",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_ae-authored/bridgetown-builders-core-openapi-generated.yml#/components/schemas/PostApiModelsModelnameDataSourcesUploadSessionsRequest",
  "type": "object",
  "properties": {
    "source_name": {
      "type": "string",
      "description": "Logical data-source name for query_data."
    },
    "staged_upload_id": {
      "type": "string",
      "description": "Preferred source: staged-upload UUID from POST /api/models/{model_name}/data-sources/upload-sessions. Upload the file with PUT to the returned upload_url before calling this tool. Sessions are authenticated, model- and user-scoped, atomically consumed before processing, and expire in 24 hours. After any ingest failure, create a new staged upload instead of replaying this id."
    },
    "filename": {
      "type": "string",
      "description": "Original .csv or .xlsx filename; required only for inline fallback."
    },
    "file_content": {
      "type": "string",
      "description": "Optional base64 fallback for a file no larger than 64 KiB decoded. Do not place larger file bodies in an MCP tool call; use staged_upload_id."
    },
    "workspace_id": {
      "type": "string",
      "description": "Workspace identifier."
    }
  },
  "required": [
    "source_name"
  ]
}