Skip to main content
Glama

clipboard_set_clipboard

Copies specified text to your macOS clipboard using AppleScript, enabling quick content transfer between applications.

Instructions

[Clipboard management operations] Set clipboard content

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesContent to copy to clipboard

Implementation Reference

  • Handler logic for the set_clipboard script: generates AppleScript that sets the system clipboard to the provided content using `set the clipboard to "${args.content}"`, with error handling and success message.
    script: (args) => `
      try
        set the clipboard to "${args.content}"
        return "Clipboard content set successfully"
      on error errMsg
        return "Failed to set clipboard: " & errMsg
      end try
    `,
  • Input schema for set_clipboard tool: requires a 'content' string parameter.
    schema: {
      type: "object",
      properties: {
        content: {
          type: "string",
          description: "Content to copy to clipboard",
        },
      },
      required: ["content"],
    },
  • src/index.ts:28-28 (registration)
    Registration of the clipboard category containing the set_clipboard script by adding it to the MCP server.
    server.addCategory(clipboardCategory);
  • Tool name construction in listTools handler: combines category name 'clipboard' and script name 'set_clipboard' to form 'clipboard_set_clipboard'.
    name: `${category.name}_${script.name}`, // Changed from dot to underscore
  • Generic tool execution handler in CallToolRequestSchema: finds script by parsing tool name, generates script content, executes via osascript, returns result. This runs for clipboard_set_clipboard.
      const result = await this.executeScript(scriptContent);
      
      this.log("info", "Tool execution completed successfully", { 
        tool: toolName,
        resultLength: result.length
      });
    
      return {
        content: [
          {
            type: "text",
            text: result,
          },
        ],
      };
    } catch (error) {
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states what the tool does but doesn't describe important behavioral aspects: whether this overwrites existing clipboard content, what format the content should be in, whether there are size limitations, or what happens after execution. For a mutation tool with zero annotation coverage, this is insufficient.

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 description is extremely concise at just two words ('Set clipboard content'), which is appropriate for a simple tool. However, the bracketed prefix '[Clipboard management operations]' adds unnecessary noise without providing useful information, slightly reducing efficiency.

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

Completeness2/5

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

For a mutation tool with no annotations and no output schema, the description is inadequate. It doesn't explain what happens after execution, whether the operation is reversible, what permissions are needed, or what format the content should be in. Given the tool's potential to affect system state, more context is needed.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already fully documents the single 'content' parameter. The description adds no additional parameter information beyond what's in the schema. This meets the baseline expectation when schema coverage is high, but doesn't provide extra value.

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 ('Set') and resource ('clipboard content'), making the purpose immediately understandable. It distinguishes from sibling clipboard_clear_clipboard and clipboard_get_clipboard by specifying the 'set' operation. However, it doesn't fully differentiate from iterm_paste_clipboard which also interacts with clipboard content.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose clipboard_set_clipboard over iterm_paste_clipboard or other clipboard-related operations, nor does it specify prerequisites or appropriate contexts for setting clipboard content.

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/joshrutkowski/applescript-mcp'

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