clipboard_get
Retrieve the current X11 clipboard selection as text.
Instructions
Read the current X11 CLIPBOARD selection 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_get"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- server.js:300-306 (handler)The handler function that executes the clipboard_get tool: uses xclip to read the X11 CLIPBOARD selection as text.
async function clipboardGet() { const missing = requireBin('xclip'); if (missing) return errorResult(missing); const r = await run(BIN.xclip, ['-selection', 'clipboard', '-o']); if (r.code !== 0) return errorResult(`clipboard_get failed: ${r.stderr || 'empty'}`); return textResult({ text: r.stdout }); } - server.js:512-517 (schema)The tool registration schema with name, description, annotations, and inputSchema (no inputs required).
{ name: 'clipboard_get', description: 'Read the current X11 CLIPBOARD selection as text.', annotations: { title: 'Read clipboard', readOnlyHint: true }, inputSchema: { type: 'object', properties: {} }, }, - server.js:560-569 (registration)The tool handler map where clipboardGet is mapped to the 'clipboard_get' tool name for dispatch.
mouse_click: mouseClick, mouse_drag: mouseDrag, mouse_scroll: mouseScroll, type_text: typeText, key_press: keyPress, clipboard_get: clipboardGet, clipboard_set: clipboardSet, launch_app: launchApp, screenshot_text: screenshotText, };