Skip to main content
Glama

clipboard

Read exact text from an app or set text for pasting in a sandboxed instance, avoiding OCR and screenshots.

Instructions

Read or set the instance's clipboard — the cheapest way to get EXACT text out of an app.

action='get' returns {"ok", "instance", "text", "length", "empty"}: select text in the app (click/drag, or press_keys('ctrl+a')) then press_keys('ctrl+c') and read it here — no OCR, no screenshot. "empty": true means nothing (or non-text data) is on the clipboard. action='set' puts text on the clipboard (then press_keys('ctrl+v') or 'shift+Insert' in terminals) and returns {"ok", "instance", "length"}. Each instance has its own clipboard (separate X display). Fails (isError) if xclip is missing or the instance is down.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "clipboard"
  }
}

Input Schema

NameRequiredDescriptionDefault
textNo
actionNoget
instanceNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses the return shape for both actions, the meaning of "empty": true (nothing or non-text data), the per-instance clipboard isolation (separate X display), and the failure condition (isError when xclip is missing or the instance is down). These are non-obvious operational facts an agent could not infer from the schema.

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

Conciseness4/5

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

The key value proposition is front-loaded in the first clause, and every subsequent sentence adds operational detail. It is dense and runs long in places (nested parenthetical instructions), but there is no filler to cut.

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 3-param tool with no annotations, the description covers invocation workflow, per-instance scoping, return contents, and failure modes. Return values are partly redundant with the output schema, but the added semantics (empty flag meaning, clipboard isolation) make it complete.

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?

Schema coverage is 0%, so the description must compensate, and it does: it explains the two action values ('get'/'set'), what `text` means in set mode, and that `instance` selects among isolated per-display clipboards. It stops short of stating the defaults (action='get', instance=1) that the schema declares, which is the only remaining gap.

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 opens with a specific verb pair and resource ("Read or set the instance's clipboard") and immediately positions it against the screenshot/OCR siblings by calling it "the cheapest way to get EXACT text out of an app." An agent can tell exactly what this does and why it differs from screenshot or parse_screen.

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

Usage Guidelines5/5

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

It gives the concrete when-to-use workflow for both modes: select text then press_keys('ctrl+c') and read here for get; press_keys('ctrl+v') or 'shift+Insert' in terminals for set. It also names the alternative it replaces (OCR, screenshot), so the selection decision is fully specified.

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