doc_open
Open a file as a new document and return its id plus a summary. Reads Pixmith documents (.pxmt) and Aseprite files (.aseprite/.ase), and imports PNG (one frame), animated GIF (frames + delays), a sprite sheet PNG cut into a grid (give cell_width/cell_height), or a sprite sheet with Aseprite JSON ...
This record as markdown: /tools/pixmith-mcp/doc-open.md
What doc_open does on Pixmith
AI agents use doc_open to create or update resources in Pixmith, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Pixmith environment.
| Parameter | Type | Required | Description |
|---|---|---|---|
crop | boolean | — | trace_grid: crop to the opaque cells (default true). |
path | string | Yes | File to open: .pxmt, .aseprite, .ase, .png, .gif, or a sprite-sheet .json (Aseprite format); with format trace_grid any image. |
seed | integer | — | trace_grid: k-means seed (default 1). |
phase | array | — | trace_grid: [x, y] offset of the first cell edge (default: detected). |
pitch | object | — | trace_grid: cell size in source pixels: "auto" (default), a number such as 6.5, or [x, y]. |
colors | object | — | trace_grid: palette: a count, "auto" (default), "keep" or a list of colors. |
format | string | — | How to read it (default auto: by extension; .png with cell_width becomes sheet_grid). native = .pxmt/.aseprite/.ase. (trace_grid: File > Import > Trace Pixel Ar |
global | boolean | — | trace_grid, remove_background: also remove enclosed background-colored pixels. |
shadow | boolean | — | trace_grid, remove_background: also remove a soft drop shadow. |
target | string | — | "app" (default; a tab of the Pixmith app, started when it is not running) or "headless" (kept inside this server only: only when the user asks for that). |
png_path | string | — | sheet_json: the sheet image (default: meta.image from the JSON, next to it). |
max_pitch | number | — |
Parameters from the server's own tool schema.
Why doc_open is rated Medium
An AI agent can call doc_open faster than any human can review: one bad instruction and it creates or modifies resources in Pixmith by the hundred, each call as confident as the last.
Risk signalsAccepts file system path (path) · High parameter count (20 properties)
Attacks that exploit this kind of access
The rule that runs doc_open 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 doc_open, this is the rule to start with:
doc_open stays usable, but capped: an agent stuck in a loop can't make hundreds of changes a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Pixmith, apply this rule, and every doc_open call is checked against it from then on.
Questions about doc_open
Open a file as a new document and return its id plus a summary. Reads Pixmith documents (.pxmt) and Aseprite files (.aseprite/.ase), and imports PNG (one frame), animated GIF (frames + delays), a sprite sheet PNG cut into a grid (give cell_width/cell_height), or a sprite sheet with Aseprite JSON metadata (pass the .json; the PNG named in meta.image is used unless png_path is given), or, with format=trace_grid (File > Import > Trace Pixel Art…), the first image of a file (PNG, JPEG, WebP, ...) traced onto its real pixel grid: "pseudo-pixel" art from AI image tools becomes real pixel art (options pitch auto|n|[x, y], colors, remove_background, shadow, tolerance, global, background_color, close_outline, crop, seed; the result's trace has pitch, phase, palette, quality). Imported documents have no .pxmt path yet; doc_save without path saves them next to the imported file (same name, .pxmt). It is categorised as a Write tool in the Pixmith MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
doc_open accepts 12 parameters: crop, path, seed, phase, pitch, colors, format, global, shadow, target, png_path, max_pitch. Required: path. 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 doc_open: 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.
doc_open is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the doc_open 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 doc_open. 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.
doc_open 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.
This server
Across the catalogue