Skip to main content
Glama

copy_from_document

Copy a pixel region from another document into the active one, preserving palette-index fidelity. Map unmatched colors by appending entries or snapping to the nearest existing.

Instructions

Copy a region of pixels from another document into this one, lossless in palette-index space — the assembly tool for multi-agent fan-out: subagents draw parts in their own documents, then a parent composes them. Source colors map to identical destination palette entries where they exist; the rest are appended ('extend', default) or snapped to the perceptually nearest existing entry ('nearest'). Placed content: ignores symmetry by default, like paste_stamp.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xNoDestination left edge (default 0)
yNoDestination top edge (default 0)
clipNoSilently discard out-of-bounds pixels instead of rejecting (default false)
frameNoFrame index, 0-based (default: active frame)
layerNoLayer id or name (default: active layer)
doc_idYesDestination document id (receives the pixels and the undo step)
regionNoRegion in SOURCE coordinates (default: the whole source canvas)
renderNoInclude a render of the change (default true)
paletteNoUnmatched source colors: 'extend' appends them (default), 'nearest' snaps to the closest existing entry
from_frameNoSource frame index (default: source active frame)
from_layerNoSource layer id or name (default: flattened visible layers)
from_doc_idYesSource document id (read-only; left unchanged)
ignore_symmetryNoDefault TRUE for this tool (placed content). Pass false to mirror the copy across the symmetry axis.
skip_transparentNoSkip transparent source pixels instead of writing them (default true)
Behavior4/5

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

With no annotations provided, the description carries full burden. It discloses that the copy is lossless in palette-index space, explains source color mapping behavior ('extend' vs 'nearest'), and states that symmetry is ignored by default. This adds significant behavioral context beyond what the schema provides.

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 a single paragraph, but it is concise and front-loaded with the main action. Every sentence adds value, though it could be more structured with bullet points for easier scanning. The length is appropriate for the complexity of the tool.

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

Completeness4/5

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

Given the tool's complexity (14 parameters, nested objects, no output schema), the description provides good contextual completeness. It covers the multi-agent use case, palette behavior, and symmetry defaults. However, it does not describe the output (e.g., whether a render is returned) or permissions, which slightly reduces completeness.

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 baseline is 3. The description adds value by explaining the 'palette' enum options and the 'ignore_symmetry' default, but does not elaborate on other parameters beyond the schema. It provides useful semantic context for two key parameters, justifying a score of 3.

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 clearly states it copies a region of pixels from another document into this one, lossless in palette-index space. It explicitly calls it 'the assembly tool for multi-agent fan-out', distinguishing it from siblings like paste_stamp and copy_region. The verb 'copy' and specific resource 'a region of pixels from another document' provide a specific and unique purpose.

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

Usage Guidelines4/5

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

The description explicitly tells when to use this tool: 'the assembly tool for multi-agent fan-out: subagents draw parts in their own documents, then a parent composes them.' It also notes that placed content ignores symmetry by default, similar to paste_stamp. While it doesn't explicitly list when not to use, the context is clear enough for an AI agent to decide.

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/ehm-93/pixel-mcp'

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