layer
Layer menu and panel: edit the layer stack (index 0 = bottom; a group comes right below its children in the list). Actions: add (new image layer above layer, default above the active one), add_group, duplicate, remove (alias: delete; a group with its children), move_up / move_down (one step), mov...
This record as markdown: /tools/pixmith-mcp/layer.md
What layer does on Pixmith
AI agents call layer to permanently remove resources in Pixmith, typically in cleanup and lifecycle workflows. It does its job in a single call, and there is no undo.
| Parameter | Type | Required | Description |
|---|---|---|---|
x | integer | — | import_png with replace: canvas x where the PNG's left edge goes (default 0; may be negative; the PNG is clipped to the canvas). |
y | integer | — | import_png with replace: canvas y where the PNG's top edge goes (default 0). |
to | integer | — | move_to: target stack position. |
doc | string | — | Document id (see doc_list); optional when only one document is open. |
cols | integer | — | import_sheet: use only this many columns of the sheet (default: all that fit). |
name | string | — | add/add_group/set: layer name. |
path | string | — | import_png: PNG file. |
rows | integer | — | import_sheet: use only this many rows (default: all that fit). |
frame | integer | — | import_png: frame to put it in (default: active). |
group | object | — | into_group: the group (index or name). |
layer | object | — | The layer to act on, index or name (default: active). For add/add_group/import_png: the new layer goes above it. |
action | string | Yes |
Parameters from the server's own tool schema.
Why layer is rated Critical
An AI agent that decides to call layer doesn't hesitate, doesn't double-check, and doesn't stop at one. Whatever it removes from Pixmith is gone. There is no undo for destructive operations.
Risk signalsAccepts file system path (path) · High parameter count (20 properties)
Attacks that exploit this kind of access
The rule that runs layer safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Pixmith, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For layer, this is the rule to start with:
layer is removed from the agent's tool list entirely, so the agent never calls it. The rest of the server keeps working.
The button opens the PolicyLayer dashboard: create your workspace, connect Pixmith, apply this rule, and every layer call is checked against it from then on.
Questions about layer
Layer menu and panel: edit the layer stack (index 0 = bottom; a group comes right below its children in the list). Actions: add (new image layer above layer, default above the active one), add_group, duplicate, remove (alias: delete; a group with its children), move_up / move_down (one step), move_to (to stack position to), into_group (move into group), out_of_group, wrap_in_group (put the layer in a new group), merge_down, set (any of name, visible, opacity 0-255, blend_mode), import_sheet (slice a sprite-sheet PNG path into cells of cell_width x cell_height (cell_height defaults to cell_width), read row by row, onto consecutive frames of the existing image layer (or a new one with new_layer=true and name) starting at frame (default 0); frames are created after the last one as needed; optional cols / rows / frames limit the cells; one undo step), import_png (PNG file as a new layer; with replace=true it instead puts the PNG into the existing layer at frame in one undo step, keeping the layer's name, order, opacity and blend mode, optionally shifted by x / y). New layers become the active layer. Returns the updated layer list. It is categorised as a Destructive tool in the Pixmith MCP Server, which means it can permanently delete or destroy data. Block by default and require explicit approval.
layer accepts 12 parameters: x, y, to, doc, cols, name, path, rows, frame, group, layer, action. Required: action. The full parameter table on this page comes from the server's own tool schema.
Register the Pixmith MCP server in PolicyLayer and add a rule for layer: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Pixmith. Nothing to install.
layer is a Destructive tool with critical risk. Critical-risk tools should be blocked by default and only enabled with explicit human approval.
Yes. Add a rate_limit block to the layer rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for layer. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
layer is provided by the Pixmith MCP server (pixmith-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Pixmith, and thousands of servers like it.
Across the catalogue