Skip to main content
Glama
FutureAtoms

Agentic Control Framework (ACF)

by FutureAtoms

browser_file_upload

Uploads files from a browser to enable agentic automation and control within the framework.

Instructions

browser file upload

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • browserFileUpload function: main handler that finds a file input on the page, resolves paths, checks existence, and uploads files using Playwright's setInputFiles.
    async function browserFileUpload(paths) {
      try {
        if (!paths || !Array.isArray(paths)) {
          return {
            success: false,
            message: 'File paths array is required'
          };
        }
    
        const page = await getPage();
        
        // Find file input
        const fileInput = await page.$('input[type="file"]');
        if (!fileInput) {
          return {
            success: false,
            message: 'No file input found on page'
          };
        }
    
        // Resolve paths
        const resolvedPaths = paths.map(p => path.resolve(p));
        
        // Check if files exist
        for (const filePath of resolvedPaths) {
          if (!fs.existsSync(filePath)) {
            return {
              success: false,
              message: `File not found: ${filePath}`
            };
          }
        }
    
        // Upload files
        await fileInput.setInputFiles(resolvedPaths);
    
        return {
          success: true,
          message: `Uploaded ${paths.length} file(s)`,
          paths: resolvedPaths
        };
    
      } catch (error) {
        logger.error(`Error uploading files: ${error.message}`);
        return {
          success: false,
          message: error.message
        };
      }
    }
  • Tool registration in MCP server: adds 'browser_file_upload' to the browserExtras list with a minimal input schema.
    const browserExtras = [
      { n:'browser_navigate_back' }, { n:'browser_navigate_forward' }, { n:'browser_hover' }, { n:'browser_drag' },
      { n:'browser_select_option' }, { n:'browser_press_key' }, { n:'browser_snapshot' }, { n:'browser_console_messages' },
      { n:'browser_network_requests' }, { n:'browser_tab_list' }, { n:'browser_tab_new' }, { n:'browser_tab_select' },
      { n:'browser_tab_close' }, { n:'browser_file_upload' }, { n:'browser_wait' }, { n:'browser_wait_for' },
      { n:'browser_resize' }, { n:'browser_handle_dialog' }
    ];
    for (const b of browserExtras) {
      tools.push({ name: b.n, description: b.n.replace(/_/g,' '), inputSchema: { type:'object', properties:{} } });
    }
  • Tool call dispatch: routes 'browser_file_upload' to browserTools.browserFileUpload(args.paths).
    case 'browser_file_upload': data = await browserTools.browserFileUpload(args.paths); break;
  • getPage helper function: retrieves or creates the current browser page used by browserFileUpload.
    async function getPage() {
      if (!page || page.isClosed()) {
        const browser = await getBrowser();
        if (!context) {
          context = await browser.newContext();
        }
        page = await context.newPage();
      }
      return page;
    }
  • Exports: browserFileUpload is exported from the browser_tools module.
    browserFileUpload,
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description fails to disclose any behavioral traits such as whether it opens a file picker, supports drag-and-drop, or handles specific file types, leaving the agent without essential safety or usage context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

While short, the description is underspecified and fails to earn its place. It sacrifices usefulness for brevity, providing no actionable information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given zero parameters, no annotations, and no output schema, the description is grossly incomplete; an agent cannot determine how to invoke the tool effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has no parameters, so the baseline is 4, but the description adds no value beyond the empty schema; it does not explain how the tool works or what the agent should expect.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'browser file upload' simply restates the name, offering no specific verb, resource, or differentiation from sibling tools like browser_drag or browser_handle_dialog.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives, nor any context about the upload process or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/FutureAtoms/agentic-control-framework'

If you have feedback or need assistance with the MCP directory API, please join our Discord server