traceImage
Turn a raster image into hand-drawn freedraw strokes on a whiteboard, deterministically. Pass an image (imageUrl OR imageBase64) plus a style; the server fetches and vectorises it server-side and draws the strokes, so you do NOT emit any coordinates yourself (LLMs are poor at that and it wastes t...
This record as markdown: /tools/io-stablebaseline-sb/traceimage.md
What traceImage does on Stable Baseline
AI agents use traceImage to create or update resources in Stable Baseline, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Stable Baseline environment.
| Parameter | Type | Required | Description |
|---|---|---|---|
x | number | — | Top-left x on the canvas. Omit to auto-place to the right of existing content. |
y | number | — | Top-left y on the canvas. Omit to auto-place. |
style | string | — | Vectorisation style. 'sketch' = clean line art (default), 'color' = more colors, 'poster' = posterised. |
width | number | — | Target display width in px (default 520); the drawing scales to fit, aspect preserved. |
imageUrl | string | — | URL to fetch the image from (http/https; private and metadata hosts are blocked). |
mimeType | string | — | Optional image MIME type hint (e.g. 'image/png'); auto-detected otherwise. |
maxColors | number | — | Palette size 2-16 (defaults by style: sketch 3, color 8, poster 12). |
documentId | string | Yes | The whiteboard's documentId. |
maxStrokes | number | — | Cap on the number of strokes, 20-1200 (default 600). Lower = simpler and faster. |
imageBase64 | string | — | Base64-encoded image bytes (a data: URL prefix is allowed). Use instead of imageUrl. |
Parameters from the server's own tool schema.
Why traceImage is rated Medium
This tool creates new content on a whiteboard by vectorising an image and drawing strokes onto it. It is a Write operation — it creates/modifies whiteboard data in a reversible way (strokes can be deleted). No code execution, financial action, or irreversible destruction is involved.
From the tool's definition 'draws the strokes', 'Turn a raster image into hand-drawn freedraw strokes on a whiteboard', 'Auto-places to the ri[ght]'
Risk signalsHigh parameter count (10 properties)
Attacks that exploit this kind of access
The rule that runs traceImage safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Stable Baseline, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For traceImage, this is the rule to start with:
traceImage 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 Stable Baseline, apply this rule, and every traceImage call is checked against it from then on.
Questions about traceImage
Turn a raster image into hand-drawn freedraw strokes on a whiteboard, deterministically. Pass an image (imageUrl OR imageBase64) plus a style; the server fetches and vectorises it server-side and draws the strokes, so you do NOT emit any coordinates yourself (LLMs are poor at that and it wastes tokens). Use this for requests like 'sketch this image onto the board', portraits, or turning a logo into line art. style: 'sketch' (~3 colors, clean line art; default), 'color' (~8 colors), 'poster' (~12 colors). Returns a compact summary (stroke count), never the raw coordinates. Auto-places to the right of existing content unless x/y are given. It is categorised as a Write tool in the Stable Baseline MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
traceImage accepts 10 parameters: x, y, style, width, imageUrl, mimeType, maxColors, documentId, maxStrokes, imageBase64. Required: documentId. The full parameter table on this page comes from the server's own tool schema.
Register the Stable Baseline MCP server in PolicyLayer and add a rule for traceImage: 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 Stable Baseline. Nothing to install.
traceImage 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 traceImage 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 traceImage. 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.
traceImage is provided by the Stable Baseline MCP server (https://api.stablebaseline.io/functions/v1/cloud-serve/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Stable Baseline, and thousands of servers like it.
This server
Across the catalogue