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 call traceImage to retrieve information from Stable Baseline without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.
| 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 colours, '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 Low
Even though traceImage only reads data, uncontrolled read access leaks sensitive information and racks up API costs: an agent caught in a retry loop can make thousands of calls a minute without anyone noticing.
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 is read-only, so it stays allowed. 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 colours, clean line art; default), 'color' (~8 colours), 'poster' (~12 colours). 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 Read tool in the Stable Baseline MCP Server, which means it retrieves data without modifying state.
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 Read tool with low risk. Read-only tools are generally safe to allow by default.
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