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
| Name | Required | Description | Default |
|---|---|---|---|
| paths | Yes | The absolute paths to the files to upload. Can be a single file or multiple files. |
Implementation Reference
- src/tools/files.ts:33-46 (handler)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); }); },
- src/tools/files.ts:23-31 (schema)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', },
- src/tools/files.ts:50-52 (registration)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, ];