Skip to main content
Glama
JustasMonkev

MCP Accessibility Scanner

browser_file_upload

Destructive

Upload one or multiple files to the MCP Accessibility Scanner for automated web accessibility scans, ensuring WCAG compliance with detailed visual and JSON reports.

Instructions

Upload one or multiple files

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathsYesThe absolute paths to the files to upload. Can be a single file or multiple files.

Implementation Reference

  • Handler implementation for the browser_file_upload tool. It locates the file chooser modal state, validates its presence, injects code to set the files, clears the modal state, and waits for the operation to complete.
    handle: async (tab, params, response) => {
      response.setIncludeSnapshot();
    
      const modalState = tab.modalStates().find(state => state.type === 'fileChooser');
      if (!modalState)
        throw new Error('No file chooser visible');
    
      response.addCode(`await fileChooser.setFiles(${JSON.stringify(params.paths)})`);
    
      tab.clearModalState(modalState);
      await tab.waitForCompletion(async () => {
        await modalState.fileChooser.setFiles(params.paths);
      });
    },
  • Schema definition for the browser_file_upload tool, specifying name, title, description, Zod input schema for 'paths' array of strings, and destructive type.
    schema: {
      name: 'browser_file_upload',
      title: 'Upload files',
      description: 'Upload one or multiple files',
      inputSchema: z.object({
        paths: z.array(z.string()).describe('The absolute paths to the files to upload. Can be a single file or multiple files.'),
      }),
      type: 'destructive',
    },
  • Local registration of the uploadFile tool (browser_file_upload) by exporting it as default array from files.ts module.
    export default [
      uploadFile,
    ];
  • src/tools.ts:38-56 (registration)
    Global registration where browser_file_upload from files module is included in the allTools array via spread operator, providing the complete list of tools for the MCP server backend.
    export const allTools: Tool<any>[] = [
      ...common,
      ...console,
      ...dialogs,
      ...evaluate,
      ...files,
      ...form,
      ...install,
      ...keyboard,
      ...navigate,
      ...network,
      ...mouse,
      ...pdf,
      ...screenshot,
      ...snapshot,
      ...tabs,
      ...wait,
      ...verify,
    ];
Behavior4/5

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

Annotations indicate destructiveHint=true and readOnlyHint=false, implying a write operation that modifies state. The description adds value by clarifying it handles 'one or multiple files,' which isn't covered by annotations. However, it doesn't disclose additional behavioral traits like authentication needs, rate limits, or specific effects (e.g., overwriting files).

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

Conciseness5/5

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

The description is extremely concise—a single, front-loaded sentence that directly states the tool's function without unnecessary words. Every word earns its place, making it efficient and easy to parse.

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

Completeness3/5

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

Given the tool's moderate complexity (file upload with destructive potential) and rich annotations (covering safety and world hints), the description is minimally adequate. However, without an output schema or details on upload results (e.g., success/failure indicators), it leaves gaps for the agent to handle responses.

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

Parameters3/5

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

The input schema has 100% description coverage, with the 'paths' parameter clearly documented as 'The absolute paths to the files to upload. Can be a single file or multiple files.' The description adds no further meaning beyond this, as it only repeats 'one or multiple files' without elaborating on path formats or constraints.

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

Purpose4/5

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

The description 'Upload one or multiple files' clearly states the verb (upload) and resource (files), distinguishing it from sibling browser tools that perform actions like clicking, navigating, or taking screenshots. However, it doesn't specify the target destination or context (e.g., to a browser session or web form), which would make it more specific.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an active browser session), context (e.g., for file input forms), or exclusions (e.g., not for downloading). This lack of usage context leaves the agent to infer from sibling tool names alone.

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

Related 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/JustasMonkev/mcp-accessibility-scanner'

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