Skip to main content
Glama

pilot_resize

Adjust browser viewport dimensions to test responsive design or simulate different screen sizes by specifying width and height in pixels.

Instructions

Set the browser viewport size.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
widthYesViewport width in pixels
heightYesViewport height in pixels

Implementation Reference

  • The handler implementation for the 'pilot_resize' tool, which sets the browser viewport size using the BrowserManager instance.
    async ({ width, height }) => {
      await bm.ensureBrowser();
      try {
        await bm.setViewport(width, height);
        return { content: [{ type: 'text' as const, text: `Viewport set to ${width}x${height}` }] };
      } catch (err) {
        return { content: [{ type: 'text' as const, text: wrapError(err) }], isError: true };
      }
    }
  • Registration of the 'pilot_resize' tool with its schema definition using Zod.
    server.tool(
      'pilot_resize',
      'Set the browser viewport size.',
      {
        width: z.number().describe('Viewport width in pixels'),
        height: z.number().describe('Viewport height in pixels'),
      },
Behavior2/5

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

No annotations provided, so description carries full disclosure burden. Fails to mention behavioral aspects: whether resize triggers reflow/media queries, affects subsequent screenshots, requires page reload, or is synchronous vs. async.

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

Conciseness4/5

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

Extremely efficient at 5 words. Front-loaded with action verb. However, given zero annotations, the brevity approaches under-specification rather than ideal conciseness—it could accommodate behavioral context without becoming verbose.

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

Completeness3/5

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

Adequate for a simple 2-parameter setter with complete schema coverage. However, lacks completeness given no output schema and no annotations—a resize operation in browser automation typically warrants mention of side effects on page layout or screenshot capture.

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

Parameters3/5

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

Schema has 100% description coverage ('Viewport width/height in pixels'), so baseline is 3. Description implies the parameters via 'viewport size' but adds no semantic detail, examples, or constraints (e.g., minimum dimensions, standard breakpoints) beyond what the schema provides.

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

Purpose4/5

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

Clear verb 'Set' with specific resource 'browser viewport size'. However, it does not explicitly distinguish from sibling tool 'pilot_responsive' which likely handles responsive device emulation, nor clarify when to use this vs. other viewport-affecting tools.

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

Usage Guidelines2/5

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

Provides no guidance on when to use this tool (e.g., before screenshots, for breakpoint testing) or when not to use it. No mention of alternatives like 'pilot_responsive' for device emulation vs. raw dimension setting.

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/TacosyHorchata/Pilot'

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