copy_to_clipboard
Copy text to your clipboard from within the MCP System Bridge server, enabling AI assistants to manage clipboard content for system integration.
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 main handler function for the 'copy_to_clipboard' tool. It is decorated with @mcp.tool, which registers it as an MCP tool. The function copies the provided text to the system clipboard using pyperclip and returns a success or error message.@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}"