Skip to main content
Glama

Cut-Copy-Paste Clipboard Server

AGENTIC_USAGE.md2.1 kB
# MCP Cut/Copy/Paste Tools - Agent Quick Reference ## Tools ### `copy_lines` Copy lines without modifying source. *Params:* `file_path`, `start_line`, `end_line` (1-indexed) *Use:* Duplicate boilerplate, extract patterns, replicate code across files ```json {"file_path": "src/utils.js", "start_line": 10, "end_line": 25} ``` ### `cut_lines` Remove lines from source and save to clipboard. *Params:* `file_path`, `start_line`, `end_line` *Use:* Move functions between files, relocate code during refactoring ### `paste_lines` Insert clipboard content at one or more locations. *Params:* `targets[]` where each target has `file_path`, `target_line` *Use:* Apply boilerplate to multiple files, insert extracted code *Note:* Supports multi-target paste in single operation ```json {"targets": [ {"file_path": "src/auth.js", "target_line": 5}, {"file_path": "src/api.js", "target_line": 8} ]} ``` ### `show_clipboard` Display current clipboard contents. *No params.* *Use:* Verify clipboard before pasting ### `undo_last_paste` Revert most recent paste operation. *No params.* *Use:* Roll back accidental or incorrect paste *Note:* Only paste operations can be undone (not cut/copy) ### `get_operation_history` View recent operations. *Params:* `limit` (optional, default 10) *Use:* Debug issues, audit trail ## Common Workflows **Extract Function (Refactor):** `cut_lines` from original → `paste_lines` to new location → replace cut site with function call → update imports **Copy Boilerplate:** `copy_lines` pattern → `paste_lines` with multiple targets **Move Code:** `cut_lines` → `paste_lines` → update imports/references **Safe Experiment:** `copy_lines` → `paste_lines` to test location → `undo_last_paste` if needed ## Critical Notes - **Line numbers:** 1-indexed (line 1 = first line) - **Clipboard scope:** Session-specific, won't affect other users - **Undo scope:** Only paste operations undoable - **Multi-paste:** Single `paste_lines` call can target multiple files - **Error safety:** Invalid paths/lines fail gracefully with clear messages

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/Pr0j3c7t0dd-Ltd/cut-copy-paste-mcp'

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