agentbrush_generate
Generate an image from a text description. Use when the user or project needs a new image asset. Presets: - realistic: Realistic (single model) - flat_illustration: Flat Illustration (single model) - pixel_art: Pixel Art (single model) - isometric: Isometric (single model) - logo: Logo (single mo...
This record as markdown: /tools/dev-agentbrush-mcp-server/agentbrush-generate.md
What agentbrush_generate does on Mcp Server
AI agents use agentbrush_generate to create or update resources in Mcp Server, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Mcp Server environment.
| Parameter | Type | Required | Description |
|---|---|---|---|
size | object | — | Image dimensions. Options: 1024x1024 (square), 1024x1536 (portrait), 1536x1024 (landscape), or { width, height } custom object. |
preset | string | — | Visual style preset. Options: realistic (photorealistic), flat_illustration (vector-like), pixel_art (retro pixel), isometric (3D isometric), logo (brand marks) |
subject | string | Yes | Description of the image to generate |
background | string | — | Background type. Options: opaque, auto. To get a transparent background, generate with opaque and then call agentbrush_remove_background. |
output_dir | string | — | Directory to save the generated image. Relative paths resolve from project root (process.cwd()). Defaults to ./public/images/ |
quality_hint | string | — | low: 1 token at 1024×1024 (fast iteration). medium: 5 tokens (default). high: 20 tokens (best quality). Multiplied by a resolution factor for non-square sizes. |
output_format | string | — | Output file format. Options: png (lossless, supports transparency), jpeg (smaller, no transparency), webp (modern, supports transparency) |
style_context | object | — | Optional brand context: { style_descriptor?: string, color_hints?: string[], mood_tags?: string[] }. When omitted, auto-filled from .agentbrush/identity.json vi |
reference_image_paths | array | — | Local absolute paths to reference images selected via agentbrush_list_references. Each path must resolve inside .agentbrush/references/ (enforced at tool runtim |
Parameters from the server's own tool schema.
Why agentbrush_generate is rated Medium
This tool creates new image assets from text descriptions. It is a Write operation — it produces new content but does not delete or irreversibly overwrite existing data, execute code, or involve financial transactions. Misuse could result in generation of off-brand or inappropriate image assets, giving it medium severity.
From the tool's definition Generate an image from a text description. Use when the user or project needs a new image asset.
Risk signalsHigh parameter count (12 properties) · Bulk/mass operation — affects multiple targets · Admin/system-level operation
Attacks that exploit this kind of access
The rule that runs agentbrush_generate safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Mcp Server, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For agentbrush_generate, this is the rule to start with:
agentbrush_generate 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 Mcp Server, apply this rule, and every agentbrush_generate call is checked against it from then on.
Questions about agentbrush_generate
Generate an image from a text description. Use when the user or project needs a new image asset. Presets: - realistic: Realistic (single model) - flat_illustration: Flat Illustration (single model) - pixel_art: Pixel Art (single model) - isometric: Isometric (single model) - logo: Logo (single model) - custom: Custom (single model) Quality levels (quality_hint): low=1 token, medium=5 tokens (default), high=20 tokens — at 1024×1024. Multiplied by a resolution factor for other sizes (portrait 0.8×, landscape 0.95×). Size: 1024x1024 (square), 1024x1536 (portrait), 1536x1024 (landscape), or a { width, height } custom object. Format: png (lossless, transparency), jpeg (smaller), webp (modern, transparency). Background: opaque or auto. For transparent backgrounds, generate with opaque and call agentbrush_remove_background on the result. style_context: optional { style_descriptor?, color_hints?, mood_tags? }. Auto-filled from .agentbrush/identity.json when omitted; explicit values override the file. reference_image_paths: optional absolute paths to reference images (max 10). When supplied, the backend routes the generation to OpenAI /v1/images/edits with the references attached as image[] parts — the model uses them as the appearance/style authority and composes the new image per the subject prompt. Paths must resolve inside .agentbrush/references/; obtain them via agentbrush_list_references or register a generated image as a reference via agentbrush_save_as_reference. Character iteration workflow: generate a character once with agentbrush_generate, optionally polish it via agentbrush_edit_mask, save it with agentbrush_save_as_reference, then every subsequent agentbrush_generate call can pass the reference path to keep the character consistent across new scenes/poses. output_dir: directory to save the image (default: ./public/images/). Relative to project root. Returns: saved file path, generation metadata, token cost, remaining balance, and an inline image preview. It is categorised as a Write tool in the Mcp Server MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
agentbrush_generate accepts 9 parameters: size, preset, subject, background, output_dir, quality_hint, output_format, style_context, reference_image_paths. Required: subject. The full parameter table on this page comes from the server's own tool schema.
Register the Mcp Server MCP server in PolicyLayer and add a rule for agentbrush_generate: 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 Mcp Server. Nothing to install.
agentbrush_generate 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 agentbrush_generate 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 agentbrush_generate. 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.
agentbrush_generate is provided by the Mcp Server MCP server (@agentbrush/mcp-server). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Mcp Server, and thousands of servers like it.
This server
Across the catalogue