chore: support channel and executable path params (#90)

Fixes https://github.com/microsoft/playwright-mcp/issues/89
This commit is contained in:
Pavel Feldman
2025-03-31 15:30:08 -07:00
committed by GitHub
parent d316441142
commit 9042c03faa
6 changed files with 69 additions and 2 deletions

View File

@@ -174,3 +174,20 @@ export const chooseFile: ToolFactory = snapshot => ({
}, snapshot);
},
});
export const install: Tool = {
schema: {
name: 'browser_install',
description: 'Install the browser specified in the config. Call this if you get an error about the browser not being installed.',
inputSchema: zodToJsonSchema(z.object({})),
},
handle: async context => {
const channel = await context.install();
return {
content: [{
type: 'text',
text: `Browser ${channel} installed`,
}],
};
},
};