Skip to main content
Glama
LukeLamb

claude-linux-mcp

clipboard_get

Read-only

Retrieve the current X11 clipboard selection as text.

Instructions

Read the current X11 CLIPBOARD selection as text.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the clipboard_get tool: uses xclip to read the X11 CLIPBOARD selection as text.
    async function clipboardGet() {
      const missing = requireBin('xclip');
      if (missing) return errorResult(missing);
      const r = await run(BIN.xclip, ['-selection', 'clipboard', '-o']);
      if (r.code !== 0) return errorResult(`clipboard_get failed: ${r.stderr || 'empty'}`);
      return textResult({ text: r.stdout });
    }
  • The tool registration schema with name, description, annotations, and inputSchema (no inputs required).
    {
      name: 'clipboard_get',
      description: 'Read the current X11 CLIPBOARD selection as text.',
      annotations: { title: 'Read clipboard', readOnlyHint: true },
      inputSchema: { type: 'object', properties: {} },
    },
  • server.js:560-569 (registration)
    The tool handler map where clipboardGet is mapped to the 'clipboard_get' tool name for dispatch.
      mouse_click: mouseClick,
      mouse_drag: mouseDrag,
      mouse_scroll: mouseScroll,
      type_text: typeText,
      key_press: keyPress,
      clipboard_get: clipboardGet,
      clipboard_set: clipboardSet,
      launch_app: launchApp,
      screenshot_text: screenshotText,
    };
Behavior3/5

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

Annotations already declare readOnlyHint=true, so description adds the X11 and text-layer context. However, it does not disclose behavior for empty or non-text clipboard contents, nor platform dependence beyond X11.

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 direct verb+object. No wasted words, front-loaded with purpose.

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

Completeness5/5

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

For a simple 0-parameter read tool with readOnlyHint, the description fully covers what the tool does and its data source. No output schema needed for a text return.

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?

No parameters in schema, so description does not need to explain them. The baseline for 0 parameters is 4; description is concise and clear.

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?

Description clearly states it reads the X11 CLIPBOARD selection as text, which is a specific verb+resource. It distinguishes from clipboard_set, which writes.

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?

No explicit guidance on when to use this tool versus alternatives like screenshot_text or type_text. Simple read operation but lacks context on prerequisites or when not to use.

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

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