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)}"
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses the tool writes text to the clipboard on macOS using `pbcopy`, which implies a mutation operation. However, it lacks details on permissions, error handling, or side effects, offering only basic behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core action and resource, followed by implementation details. It consists of two concise sentences with no wasted words, making it highly efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (one parameter) and the presence of an output schema (which handles return values), the description is reasonably complete. It covers the purpose, platform, and method, though it could benefit from more behavioral details like error cases or limitations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, so the description must compensate. It adds meaning by explaining that the 'text' parameter is the content to write to the clipboard, which clarifies the parameter's purpose beyond the schema's basic type definition. Since there's only one parameter, this is sufficient for a high score.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Write the given text') and target resource ('to the clipboard'), with additional implementation detail ('macOS') and method ('Uses `pbcopy`'). It distinguishes itself from sibling tools like 'read_clipboard' by specifying the write operation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context by specifying 'macOS', which suggests this tool is platform-specific. However, it does not explicitly state when to use it versus alternatives (e.g., other clipboard methods or tools) or provide exclusions, leaving some guidance gaps.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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