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;
      }
    }

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