Skip to main content
Glama
FutureAtoms

Agentic Control Framework (ACF)

by FutureAtoms

browser_resize

Resize the browser window to specified dimensions for responsive design testing and automation workflows.

Instructions

browser resize

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function for browser_resize. It validates width/height inputs, gets the current Playwright page, and calls page.setViewportSize({width, height}) to resize the browser window. Returns success or error messages.
    async function browserResize(width, height) {
      try {
        if (!width || !height || isNaN(width) || isNaN(height)) {
          return {
            success: false,
            message: 'Valid width and height are required'
          };
        }
    
        const page = await getPage();
        await page.setViewportSize({ width, height });
    
        return {
          success: true,
          message: `Resized browser to ${width}x${height}`,
          width,
          height
        };
    
      } catch (error) {
        logger.error(`Error resizing: ${error.message}`);
        return {
          success: false,
          message: error.message
        };
      }
    }
  • Registration of browser_resize in the tools/list response. The tool name is listed in the browserExtras array and added to the capabilities with a description derived from the name.
      { n:'browser_resize' }, { n:'browser_handle_dialog' }
    ];
    for (const b of browserExtras) {
      tools.push({ name: b.n, description: b.n.replace(/_/g,' '), inputSchema: { type:'object', properties:{} } });
    }
  • Dispatch/call routing for browser_resize in the tools/call handler. Maps the tool name to browserTools.browserResize(args.width, args.height) and stores the result in the data variable.
    case 'browser_resize': data = await browserTools.browserResize(args.width, args.height); break;
    case 'browser_handle_dialog': data = await browserTools.browserHandleDialog(args.accept, args.promptText); break;
  • Helper function getPage() called by browserResize to obtain the current Playwright page instance. Creates a new page if none exists.
    /**
     * Get current page or create new one
     */
    async function getPage() {
      if (!page || page.isClosed()) {
        const browser = await getBrowser();
        if (!context) {
          context = await browser.newContext();
        }
        page = await context.newPage();
      }
      return page;
    }
  • Export of the browserResize function in the module.exports object so it can be imported by the MCP server.
      browserResize,
      browserHandleDialog,
      browserClose,
      browserInstall,
      browserNetworkRequests
    };
Behavior1/5

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

No annotations exist, and the description does not disclose any behavioral traits—such as whether resizing is destructive, requires authentication, has side effects, or returns a result. The agent is left without critical safety or state-change information.

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

Conciseness1/5

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

The description is under-specified: two words do not constitute an adequate description. Conciseness requires earning each piece of information, but here no useful information is conveyed.

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

Completeness1/5

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

For a tool with no parameters, no output schema, and no annotations, the description is severely incomplete. It does not explain the tool's effect on the browser state or return value, leaving the agent unable to use it correctly.

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

Parameters1/5

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

Although there are zero parameters and schema coverage is 100%, the description adds no meaning beyond the schema. It fails to explain what resizing entails (e.g., to what dimensions, default behavior). The baseline for zero parameters is 4, but the description is completely redundant.

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

Purpose1/5

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

The description 'browser resize' is a tautology that merely restates the tool name without specifying the verb (e.g., 'Resize browser window') or clarifying the resource's scope. It fails to distinguish this tool from siblings like browser_navigate or browser_snapshot.

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

Usage Guidelines1/5

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

No guidance is provided on when to use this tool versus alternatives (e.g., browser_navigate, browser_drag). There are no preconditions, exclusions, or context-specific recommendations.

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/FutureAtoms/agentic-control-framework'

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