agentbrush_save_as_reference
Promote a previously-generated or mask-edited image into the project brand identity folder (.agentbrush/references/) and register it in identity.json so the agent can reuse it as a style/character reference on future agentbrush_generate calls. Typical workflow: generate a character with agentbrus...
This record as markdown: /tools/dev-agentbrush-mcp-server/agentbrush-save-as-reference.md
What agentbrush_save_as_reference does on Mcp Server
AI agents use agentbrush_save_as_reference 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 |
|---|---|---|---|
name | string | — | Optional human-readable slug for the stored filename. Defaults to the source filename. Letters, digits, hyphens, underscores only — anything else is replaced wi |
tags | array | — | Optional tags to attach to the manifest entry so future agentbrush_list_references calls can filter by them (e.g., ["character", "protagonist"]). |
image_path | string | Yes | Absolute path to the image to copy into the references folder. Typically a path returned by a prior agentbrush_generate or agentbrush_edit_mask call. |
description | string | — | Optional one-line description of the reference (e.g., "Protagonist Maya, default A-pose"). Surfaces in agentbrush_list_references output. |
Parameters from the server's own tool schema.
Why agentbrush_save_as_reference is rated Medium
This tool creates and modifies data (files in .agentbrush/references/ and entries in identity.json) in a reversible manner. It does not execute arbitrary code, delete data, or move money. The scope is limited to registering image references within a local project structure.
From the tool's definition The tool "Promote a previously-generated or mask-edited image into the project brand identity folder (.agentbrush/references/) and register it in identity.json" — explicitly writes/creates files and modifies the identity.json configuration to persist a…
Risk signalsBulk/mass operation — affects multiple targets
Attacks that exploit this kind of access
The rule that runs agentbrush_save_as_reference 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_save_as_reference, this is the rule to start with:
agentbrush_save_as_reference 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_save_as_reference call is checked against it from then on.
Questions about agentbrush_save_as_reference
Promote a previously-generated or mask-edited image into the project brand identity folder (.agentbrush/references/) and register it in identity.json so the agent can reuse it as a style/character reference on future agentbrush_generate calls. Typical workflow: generate a character with agentbrush_generate → optionally polish it via agentbrush_edit_mask → call agentbrush_save_as_reference with the saved file path → now every agentbrush_generate call can pass that reference path via reference_image_paths to keep the character consistent across new scenes. image_path must be an absolute path to a PNG/JPG/WebP file. Optional name becomes the stored filename (slugified). Optional tags and description surface in agentbrush_list_references output so the agent can filter later. Returns the manifest-relative path and the absolute path — both work as inputs to reference_image_paths. 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_save_as_reference accepts 4 parameters: name, tags, image_path, description. Required: image_path. 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_save_as_reference: 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_save_as_reference 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_save_as_reference 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_save_as_reference. 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_save_as_reference 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