Skip to main content
Glama
eva-wanxin-git

Windows Automation MCP Server

get_clipboard

Retrieve clipboard content from Windows systems to access copied text or data for automation workflows.

Instructions

获取剪贴板内容

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core implementation of the get_clipboard tool: executes PowerShell 'Get-Clipboard' to retrieve and return clipboard content.
    async getClipboard() {
      try {
        const { stdout } = await execAsync('powershell -Command "Get-Clipboard"', {
          shell: 'powershell.exe'
        });
        return { success: true, content: stdout.trim() };
      } catch (error) {
        return { success: false, error: error.message };
      }
    }
  • Input schema definition for the get_clipboard tool (no required inputs).
    {
      name: 'get_clipboard',
      description: '获取剪贴板内容',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • src/server.js:43-52 (registration)
    ClipboardTools instance is registered in the central tools map, enabling dynamic tool discovery and execution routing.
    this.tools = {
      filesystem: new FileSystemTools(),
      process: new ProcessTools(),
      mouseKeyboard: new MouseKeyboardTools(),
      window: new WindowTools(),
      screen: new ScreenTools(),
      clipboard: new ClipboardTools(),
      powershell: new PowerShellTools(),
      browser: new BrowserTools(),
    };
  • Tool dispatcher within ClipboardTools that handles routing get_clipboard calls to the specific handler.
    async executeTool(name, args) {
      switch (name) {
        case 'get_clipboard':
          return await this.getClipboard();
        case 'set_clipboard':
          return await this.setClipboard(args.text);
        case 'clear_clipboard':
          return await this.clearClipboard();
        default:
          throw new Error(`未知工具: ${name}`);
      }
    }
  • Central dispatch logic in server that routes tool calls to the appropriate tool module based on canHandle.
    for (const [category, toolModule] of Object.entries(this.tools)) {
      if (toolModule.canHandle(name)) {
        result = await toolModule.executeTool(name, args);
        break;
      }
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. '获取剪贴板内容' implies a read operation but doesn't specify what happens on failure (e.g., empty clipboard), whether it returns text, images, or other formats, or if there are system-specific limitations. This is a significant gap for a 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.

Conciseness5/5

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

The description is a single, efficient phrase ('获取剪贴板内容') that directly conveys the core purpose without any wasted words. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.

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 the tool's simplicity (0 parameters, no output schema), the description is minimal but adequate for basic understanding. However, with no annotations and no output schema, it fails to provide crucial behavioral details like return format or error handling, making it incomplete for reliable agent use.

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?

The tool has 0 parameters, and schema description coverage is 100% (though empty). The description doesn't need to add parameter semantics, so it meets the baseline of 4 for tools with no parameters, as there's nothing to compensate for.

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 '获取剪贴板内容' (Get clipboard content) clearly states the verb 'get' and the resource 'clipboard content', making the purpose immediately understandable. However, it doesn't explicitly differentiate from its sibling 'clear_clipboard' or 'set_clipboard', which would require mentioning it's a read operation versus modification operations.

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 'clear_clipboard' or 'set_clipboard'. It doesn't mention prerequisites (e.g., requires clipboard access) or typical use cases (e.g., retrieving copied text). This leaves the agent with minimal context for selection.

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