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.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "clipboard_read"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
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: