Skip to main content
Glama
debanshd

Tavily Web Search MCP Server

by debanshd

write_clipboard

Copies text to your macOS clipboard using pbcopy, enabling quick sharing or saving of search results from web queries.

Instructions

Write the given text to the clipboard (macOS). Uses pbcopy.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • server.py:78-89 (handler)
    The main handler function for the 'write_clipboard' MCP tool. It uses subprocess to call 'pbcopy' on macOS to write the provided text to the clipboard, decorated with @mcp.tool() for automatic registration and schema generation.
    @mcp.tool()
    def write_clipboard(text: str) -> str:
        """Write the given text to the clipboard (macOS). Uses `pbcopy`."""
        try:
            completed = subprocess.run([
                "bash", "-lc", "pbcopy"
            ], input=text, text=True, capture_output=True)
            if completed.returncode != 0:
                return f"❌ Failed to write clipboard (pbcopy exited {completed.returncode})."
            return "✅ Clipboard updated"
        except Exception as e:
            return f"❌ Error writing clipboard: {str(e)}"

Tool Definition Quality

Score is being calculated. Check back soon.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/debanshd/AIE7-MCP-Session'

If you have feedback or need assistance with the MCP directory API, please join our Discord server