Skip to main content
Glama

electron_resize_window

Resize an Electron app window to exact pixel dimensions and optionally set its screen position for consistent UI layout or automated testing.

Instructions

Resize the Electron app window to specified dimensions using JavaScript. Also supports setting window position.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "width": "<width>",
      "height": "<height>"
    },
    "name": "electron_resize_window"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNo
yNo
widthYesWindow width in pixels
heightYesWindow height in pixels

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden. It reveals the mechanism ("using JavaScript") but not whether the resize is synchronous, whether it throws on invalid sizes, whether position must be set atomically with size, or what happens to omitted coordinates — important for a state-mutating tool with zero annotation coverage.

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?

Two short sentences, front-loaded with the primary action and followed by the secondary capability. "Using JavaScript" is the one phrase of questionable value, but overall there is no padding.

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

Completeness2/5

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

With four parameters, no annotations, and no output schema, the definition should explain coordinate/size semantics, partial-position behavior, and the effect on the running app. None of that is present, leaving meaningful gaps for a tool that mutates window state.

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 coverage is 50%: width and height are documented in the schema, while x and y are bare numbers. The sentence "Also supports setting window position" is the only signal that x/y denote coordinates, but it doesn't state units (pixels assumed), that both should be supplied together, or how omitted values are treated.

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?

The description pairs a specific verb and resource ("Resize the Electron app window") with the target dimensions and adds a secondary capability (setting window position). It is unambiguous about what the tool does, though it does no explicit sibling differentiation among the many electron_* 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?

There is no guidance on when to resize versus using other approaches (e.g., viewport emulation via CDP), no prerequisites, and no note on when the position-setting capability should be used. The agent must infer that this is a UI-state mutation tool from the name alone.

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