update-browser
Modify browser profiles by updating domain, open URLs, cookies, username, password, group ID, name, country, proxy, and fingerprint settings for enhanced browser management.
Instructions
Update the browser
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cookie | No | The cookie of the browser, eg: "[{"domain":".baidu.com","expirationDate":"","name":"","path":"/","sameSite":"unspecified","secure":true,"value":"","id":1}]" | |
| country | No | The country of the browser, eg: "CN" | |
| domainName | No | The domain name of the browser, eg: facebook.com | |
| fingerprintConfig | No | The fingerprint config of the browser, default is automatic_timezone: 0, timezone: "", language: [], flash: "", fonts: [], webrtc: disabled, browser_kernel_config: ua_auto, random_ua: ua_version: [], ua_system_version: [], tls_switch: 0, tls: "" | |
| groupId | No | The group id of the browser, must be a numeric string (e.g., "123"). You can use the get-group-list tool to get the group list or create a new group | |
| name | No | The name of the browser, eg: "My Browser" | |
| openUrls | No | The open urls of the browser, eg: ["https://www.google.com"] | |
| password | No | The password of the browser, eg: "password" | |
| storageStrategy | No | The storage strategy of the browser, default is 0 | |
| sysAppCateId | No | The sys app cate id of the browser, you can use the get-application-list tool to get the application list | |
| userId | Yes | The user id of the browser to update, it is required when you want to update the browser | |
| userProxyConfig | No | The user proxy config of the browser | |
| username | No | The username of the browser, eg: "user" |
Implementation Reference
- src/handlers/browser.ts:66-78 (handler)The core handler function that implements the logic for updating a browser profile by making a POST request to the backend API with the provided parameters.async updateBrowser(params: UpdateBrowserParams) { const requestBody = buildRequestBody({ ...params }); requestBody.user_id = params.userId; const response = await axios.post(`${LOCAL_API_BASE}${API_ENDPOINTS.UPDATE_BROWSER}`, requestBody); if (response.data.code === 0) { return `Browser updated successfully with: ${Object.entries(response.data.data).map(([key, value]) => `${key}: ${value}`).join('\n')}`; } throw new Error(`Failed to update browser: ${response.data.msg}`); },
- src/types/schemas.ts:83-97 (schema)Zod schema that validates the input parameters for the update-browser tool, including userId (required), and optional fields like domainName, cookies, proxy config, etc.updateBrowserSchema: z.object({ domainName: z.string().optional().describe('The domain name of the browser, eg: facebook.com'), openUrls: z.array(z.string()).optional().describe('The open urls of the browser, eg: ["https://www.google.com"]'), cookie: z.string().optional().describe('The cookie of the browser, eg: "[{\"domain\":\".baidu.com\",\"expirationDate\":\"\",\"name\":\"\",\"path\":\"/\",\"sameSite\":\"unspecified\",\"secure\":true,\"value\":\"\",\"id\":1}]"'), username: z.string().optional().describe('The username of the browser, eg: "user"'), password: z.string().optional().describe('The password of the browser, eg: "password"'), groupId: z.string().optional().describe('The group id of the browser, must be a numeric string (e.g., "123"). You can use the get-group-list tool to get the group list or create a new group'), name: z.string().optional().describe('The name of the browser, eg: "My Browser"'), country: z.string().optional().describe('The country of the browser, eg: "CN"'), sysAppCateId: z.string().optional().describe('The sys app cate id of the browser, you can use the get-application-list tool to get the application list'), userProxyConfig: userProxyConfigSchema.optional(), fingerprintConfig: fingerprintConfigSchema.optional(), storageStrategy: z.number().optional().describe('The storage strategy of the browser, default is 0'), userId: z.string().describe('The user id of the browser to update, it is required when you want to update the browser') }),
- src/utils/toolRegister.ts:20-21 (registration)Registers the 'update-browser' tool with the MCP server, providing name, description, input schema, and the wrapped handler function.server.tool('update-browser', 'Update the browser', schemas.updateBrowserSchema.shape, wrapHandler(browserHandlers.updateBrowser));