draw_curve
The Curve tool: draw a cubic Bezier curve: points = [start, control1, control2, end], each [x, y].
This record as markdown: /tools/pixmith-mcp/draw-curve.md
What draw_curve does on Pixmith
AI agents invoke draw_curve to trigger actions in Pixmith. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call: builds kicked off, notifications sent, workflows started.
| Parameter | Type | Required | Description |
|---|---|---|---|
doc | string | — | Document id (see doc_list); optional when only one document is open. |
ink | string | — | simple (default; replaces pixels, transparent erases), alpha (blend over), lock_alpha (recolor only opaque pixels), behind (paint under existing pixels), shadin |
color | string | Yes | Color as "#RRGGBB" or "#RRGGBBAA" (also "#RGB", "#RGBA", "rgb(r,g,b)", "rgba(r,g,b,a)" with a in 0-1 or 0-255, a CSS basic name like "red", or "transparent"). A |
frame | integer | — | Frame (default: the active frame). |
layer | object | — | Layer index or name (default: the active layer). Must not be a group. |
mirror | string | — | Symmetry: also draw mirrored (horizontal = left/right, vertical = top/bottom) across the canvas center, or across `mirror_axis_x` / `mirror_axis_y`. |
points | array | Yes | Exactly 4 points: [start, control1, control2, end], each [x, y]. |
brush_size | integer | — | Brush size in pixels, 1-64 (default 1). |
brush_shape | string | — | square (default) or circle (round brush for sizes above 1). |
shading_ramp | array | — | Colors the shading ink steps through (default: the palette). |
mirror_axis_x | number | — | Where the left/right mirror line is, in pixels from the left edge (default: the canvas center). 16 is the line between columns 15 and 16 (column 15 mirrors to 1 |
mirror_axis_y | number | — | Where the top/bottom mirror line is, in pixels from the top edge (default: the canvas center); like `mirror_axis_x`. |
Parameters from the server's own tool schema.
Why draw_curve is rated High
draw_curve triggers real processes with real consequences. An agent gone sideways doesn't fire it once. It starts dozens of builds, sends mass notifications, or burns through compute before anyone looks up.
Risk signalsHigh parameter count (13 properties)
Attacks that exploit this kind of access
The rule that runs draw_curve 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 draw_curve, this is the rule to start with:
draw_curve stays usable, but rate-capped: a runaway agent can't fire it dozens of times 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 draw_curve call is checked against it from then on.
Questions about draw_curve
The Curve tool: draw a cubic Bezier curve: points = [start, control1, control2, end], each [x, y]. It is categorised as a Execute tool in the Pixmith MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.
draw_curve accepts 12 parameters: doc, ink, color, frame, layer, mirror, points, brush_size, brush_shape, shading_ramp, mirror_axis_x, mirror_axis_y. Required: color, points. 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 draw_curve: 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.
draw_curve is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.
Yes. Add a rate_limit block to the draw_curve 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 draw_curve. 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.
draw_curve 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