Skip to main content
Glama
eva-wanxin-git

Windows Automation MCP Server

browser_screenshot

Capture webpage screenshots through browser automation. Save full-page or partial screenshots to specified paths for documentation or testing purposes.

Instructions

截取网页截图

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNo保存路径(可选)
fullPageNo是否整页截图(可选)
sessionIdNo会话 ID(可选)

Implementation Reference

  • The `screenshot` method that executes the `browser_screenshot` tool logic using Puppeteer's `page.screenshot()` to capture the page screenshot and save it to a file.
    async screenshot(savePath, fullPage = false, sessionId = 'default') {
      try {
        const page = this.pages.get(sessionId);
        if (!page) {
          return { success: false, error: '浏览器未启动' };
        }
    
        const timestamp = new Date().toISOString().replace(/[:.]/g, '-');
        const defaultPath = `screenshot-browser-${timestamp}.png`;
        const path = savePath || defaultPath;
    
        await page.screenshot({ path, fullPage });
    
        return { success: true, path, fullPage, message: '截图已保存' };
      } catch (error) {
        return { success: false, error: error.message };
      }
  • The tool definition including the input schema for `browser_screenshot` in `getToolDefinitions()`.
    {
      name: 'browser_screenshot',
      description: '截取网页截图',
      inputSchema: {
        type: 'object',
        properties: {
          path: { type: 'string', description: '保存路径(可选)' },
          fullPage: { type: 'boolean', description: '是否整页截图(可选)' },
          sessionId: { type: 'string', description: '会话 ID(可选)' },
        },
      },
    },
  • The switch case in `executeTool` method that registers and dispatches the `browser_screenshot` tool call to its handler.
    case 'browser_screenshot':
      return await this.screenshot(args.path, args.fullPage, args.sessionId);
Behavior2/5

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

No annotations are provided, so the description carries full burden. '截取网页截图' implies a read-only operation that captures visual content, but doesn't disclose important behavioral aspects: whether it requires an active browser session, what happens if no session exists, whether it saves automatically or requires a path parameter, what the default behavior is when parameters are omitted, or what format/quality the screenshot has. For a tool with 3 parameters and no annotation coverage, this is insufficient.

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?

The description is extremely concise at just 4 characters (2 Chinese words), with zero wasted words. It's front-loaded with the core function and contains no unnecessary elaboration. For a simple tool, this level of brevity is appropriate and efficient.

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?

Given 3 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain what the tool returns (screenshot data? file path? success status?), doesn't mention error conditions, and provides minimal behavioral context. For a tool that likely interacts with browser sessions and file systems, more completeness is needed to guide proper usage.

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 description coverage is 100%, so the schema already documents all 3 parameters (path, fullPage, sessionId) with their types and optional status. The description adds no parameter-specific information beyond what's in the schema - it doesn't explain what 'fullPage' means in practice, what format 'path' should use, or how 'sessionId' relates to browser sessions. With complete schema coverage, the baseline 3 is appropriate.

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

Purpose3/5

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

The description '截取网页截图' (capture webpage screenshot) clearly states the tool's basic function as a screenshot utility, but it's vague about scope and doesn't distinguish it from sibling tools like 'take_screenshot' or 'take_screenshot_region'. It specifies 'webpage' which differentiates it from general screen capture tools, but doesn't clarify how it differs from other browser-related 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?

The description provides no guidance on when to use this tool versus alternatives like 'take_screenshot' or 'take_screenshot_region'. There's no mention of prerequisites (such as needing an active browser session), nor any context about when this specific browser screenshot tool is preferable to general screenshot tools. The agent must infer usage 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.

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/eva-wanxin-git/windows-automation-mcp'

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