Skip to main content
Glama
Ronnietag
by Ronnietag

clipboard_read

Access clipboard content on Linux systems to retrieve copied text or data for integration with AI workflows and system operations.

Instructions

Read current clipboard contents

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The implementation of the clipboard_read tool, which attempts to read the clipboard using `xclip` or `pbpaste`.
    def execute_clipboard_read() -> str:
        """Read clipboard contents."""
        try:
            result = subprocess.run(
                ["xclip", "-selection", "clipboard", "-o"],
                capture_output=True,
                text=True,
                timeout=5,
            )
            if result.returncode == 0:
                return result.stdout
            return "(clipboard empty)"
        except FileNotFoundError:
            try:
                result = subprocess.run(
                    ["pbpaste"],
                    capture_output=True,
                    text=True,
                    timeout=5,
                )
                return result.stdout if result.returncode == 0 else "(clipboard unavailable)"
            except Exception:
                return "(clipboard tool not available)"
        except Exception:
            return "(clipboard read failed)"
  • Registration of the clipboard_read tool within the tools library.
        name="clipboard_read",
        scope=PermissionLevel.SAFE,
        description="Read current clipboard contents",
    )
Behavior2/5

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

With no annotations, the description carries the full burden but fails to disclose return format (text/binary/object), error conditions (empty clipboard), or permission requirements.

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?

Single sentence with no extraneous text. Appropriate length for a simple parameterless tool—every word earns its place.

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

Completeness3/5

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

Adequate for basic identification but incomplete regarding output format. Without an output schema, the description should indicate what data structure or type is returned (string, object, etc.).

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?

Zero-parameter tool with 100% schema coverage (empty object). Baseline score applies as the description correctly implies no arguments are needed.

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

Purpose4/5

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

The description clearly states the verb (read) and resource (clipboard contents), distinguishing it from sibling file_read and app_launch tools. However, 'contents' is vague regarding data type/format returned.

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

Usage Guidelines2/5

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

No guidance provided on when to use this versus alternatives (e.g., when clipboard contains a file path vs using file_read directly) or prerequisites like clipboard permissions.

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/Ronnietag/linux-mcp'

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