Skip to main content
Glama

browser_file_upload

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, ];

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