copy_to_clipboard
Copy text to the clipboard directly using the MCP System Bridge, enabling AI assistants to manage clipboard content efficiently for streamlined workflows.
Instructions
Copy text to the clipboard.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes |
Implementation Reference
- src/server.py:41-50 (handler)The handler function for the 'copy_to_clipboard' tool. It uses pyperclip to copy the provided text to the system clipboard and returns a success or error message. Registered via the @mcp.tool decorator.@mcp.tool(annotations=ToolAnnotations(readOnlyHint=True)) def copy_to_clipboard(text: str) -> str: """ Copy text to the clipboard. """ try: pyperclip.copy(text) return "Text copied to clipboard successfully." except Exception as e: return f"Error copying text to clipboard: {e}"