Skip to main content

BROWSER_SET_FILES_TOOL

Constant BROWSER_SET_FILES_TOOL 

Source
pub(crate) const BROWSER_SET_FILES_TOOL: &str = r#"{
  "name": "BrowserSetFiles",
  "description": "Upload files into a file input (named \"file input\" in BrowserSnapshot) by its ref, without opening a file dialog. Only files inside your own workspace are allowed (absolute paths, or relative to your workspace); copy a file there first if it lives elsewhere. Up to 25 MB in all; for bigger files, hand the pane to the user (BrowserHandoff). Returns the names and sizes the input now holds. A few pages only react to a file the user picked themselves: if the page doesn't show the file after this, hand the pane to the user to pick it. Every upload is logged.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "pane": { "type": "string", "description": "The pane id OpenBrowser returned (omit to act on your own pane, if it is a browser pane)" },
      "ref": { "type": "string", "description": "The file input's ref from the latest BrowserSnapshot" },
      "paths": { "type": "array", "items": { "type": "string" }, "description": "Files to upload (at most 10)" }
    },
    "required": ["ref", "paths"]
  }
}"#;