clipboard_read
Retrieve text content from the system clipboard for integration with desktop automation workflows in Hyprland environments.
Instructions
Read the current clipboard contents as text.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- hyprland_mcp/clipboard.py:8-19 (handler)The actual implementation of the clipboard reading logic using wl-paste.
async def read() -> str: """Read clipboard contents as text.""" require_tool("wl-paste") proc = await asyncio.create_subprocess_exec( "wl-paste", "-n", stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE, ) stdout, stderr = await proc.communicate() if proc.returncode != 0: raise ClipboardError(f"wl-paste failed: {stderr.decode().strip()}") return stdout.decode() - hyprland_mcp/server.py:207-208 (registration)MCP tool registration and handler entry point for clipboard_read.
@mcp.tool() async def clipboard_read() -> str: