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;
    }
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It successfully discloses the behavioral impact (affects which cookies are used for subsequent authenticated requests) and critical configuration details (default is chrome, supported browsers list). It lacks details on persistence scope or validation behavior, but covers the essential safety and operational context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two well-structured sentences with zero waste. The first sentence front-loads the core purpose and context; the second provides the enumeration of valid values and default. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given this is a simple single-parameter configuration tool with no output schema, the description is complete. It covers purpose, valid inputs, default behavior, and operational context (authentication) sufficient for correct invocation without additional structured metadata.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

While the input schema has 100% coverage describing the parameter, the description adds valuable semantic context: the default value ('Default is chrome') not present in the schema, and the usage context ('authenticated requests') which clarifies why one would change this parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific action verb ('Switch') and clear resource ('browser's cookies'), clearly distinguishing this setter from the sibling 'get_browser' getter tool. It precisely defines the scope (authenticated requests) and supported values.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides clear context for when to use the tool ('for authenticated requests'), implying it should be invoked when authentication via a specific browser is required. However, it does not explicitly reference the sibling 'get_browser' as the alternative for reading the current state or provide explicit 'when not to use' guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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