Skip to main content
Glama

set_browser

Switch authenticated browser cookies for YouTube and TikTok video control. Select from Chrome, Firefox, Brave, Edge, Safari, Opera, Chromium, or Vivaldi to change which browser's login data is used.

Instructions

Switch which browser's cookies are used for authenticated requests. Supports: chrome, firefox, brave, edge, safari, opera, chromium, vivaldi. Default is chrome.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
browserYesBrowser name: chrome, firefox, brave, edge, safari, opera, chromium, vivaldi

Implementation Reference

  • Tool registration and handler for 'set_browser'. It calls the setBrowser helper.
    server.tool(
      'set_browser',
      `Switch which browser's cookies are used for authenticated requests. Supports: ${[...SUPPORTED_BROWSERS].join(', ')}. Default is chrome.`,
      {
        browser: z.string().describe(`Browser name: ${[...SUPPORTED_BROWSERS].join(', ')}`),
      },
      async ({ browser }) => {
        const err = setBrowser(browser);
        if (err) return errorResult(err);
        return textResult({ status: 'browser_updated', browser: getBrowser() });
      }
    );
  • The implementation of the setBrowser function, which validates the browser name against a list of supported browsers and updates the currentBrowser state.
    export function setBrowser(name: string): string | null {
      const lower = name.toLowerCase() as BrowserName;
      if (!SUPPORTED_BROWSERS.includes(lower)) {
        return `Unsupported browser: ${name}. Supported: ${SUPPORTED_BROWSERS.join(', ')}`;
      }
      currentBrowser = lower;
      return null;
    }

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/ronantakizawa/social-video-mcp'

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