Skip to main content
Glama

Windows Automation MCP Server

clear_clipboard

Clear clipboard contents to remove sensitive data or prepare for new content copying in Windows automation workflows.

Instructions

清空剪贴板

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "properties": {}, "type": "object" }

Implementation Reference

  • The clearClipboard method implements the core logic of the clear_clipboard tool by executing a PowerShell command to set the clipboard value to null, handling success and error cases.
    async clearClipboard() { try { await execAsync('powershell -Command "Set-Clipboard -Value $null"', { shell: 'powershell.exe' }); return { success: true, message: '剪贴板已清空' }; } catch (error) { return { success: false, error: error.message }; } }
  • The schema definition for the clear_clipboard tool, including its name, description, and an empty input schema since no parameters are required.
    { name: 'clear_clipboard', description: '清空剪贴板', inputSchema: { type: 'object', properties: {}, }, },
  • The getToolDefinitions method registers the clear_clipboard tool (along with get_clipboard and set_clipboard) by returning an array of tool definitions for the MCP protocol.
    getToolDefinitions() { return [ { name: 'get_clipboard', description: '获取剪贴板内容', inputSchema: { type: 'object', properties: {}, }, }, { name: 'set_clipboard', description: '设置剪贴板内容', inputSchema: { type: 'object', properties: { text: { type: 'string', description: '要设置的文本内容' }, }, required: ['text'], }, }, { name: 'clear_clipboard', description: '清空剪贴板', inputSchema: { type: 'object', properties: {}, }, }, ]; }

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