generate_style_template
Render one of a style's two template images — a REAL step of style setup, not an optional extra: a style isn't finished until both its character and environment templates are rendered (the app shows them on the style card). Asset reference images render against them (characters → character templa...
This record as markdown: /tools/com-framesail-framesail/generate-style-template.md
What generate_style_template does on Framesail
AI agents use generate_style_template to create or update resources in Framesail, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Framesail environment.
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | — | Image model ID; empty uses the template job's default (see list_models) |
replace | boolean | — | Set True ONLY to deliberately overwrite an existing template of this type — the user must have asked for a new one. Leave False and the call refuses rather than |
style_id | string | Yes | Style ID, as returned by create_style or list_styles |
template_type | string | Yes | Which of the style's two template images to render: "character" or "environment" — run once for each |
editable_sections | object | — | Per-call prompt section overrides, keyed by section name; see get_section_template for the template job |
Parameters from the server's own tool schema.
Why generate_style_template is rated Medium
An AI agent can call generate_style_template faster than any human can review: one bad instruction and it creates or modifies resources in Framesail by the hundred, each call as confident as the last.
Risk signalsBulk/mass operation — affects multiple targets
Attacks that exploit this kind of access
The rule that runs generate_style_template safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Framesail, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For generate_style_template, this is the rule to start with:
generate_style_template 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 Framesail, apply this rule, and every generate_style_template call is checked against it from then on.
Questions about generate_style_template
Render one of a style's two template images — a REAL step of style setup, not an optional extra: a style isn't finished until both its character and environment templates are rendered (the app shows them on the style card). Asset reference images render against them (characters → character template; environments and objects → environment template), and segment renders fall back on them when a shot has no asset reference — so finish BOTH before generate_asset_reference. Run once per template_type ("character" | "environment") for every new style; skip types the style already has (get_style's templates). A template already exists is a hard stop here — the call refuses unless replace=True, because overwriting one silently re-anchors every future render. Async — await_jobs(style_id=...), then get_style. It is categorised as a Write tool in the Framesail MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
generate_style_template accepts 5 parameters: model, replace, style_id, template_type, editable_sections. Required: style_id, template_type. The full parameter table on this page comes from the server's own tool schema.
Register the Framesail MCP server in PolicyLayer and add a rule for generate_style_template: 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 Framesail. Nothing to install.
generate_style_template 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 generate_style_template 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 generate_style_template. 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.
generate_style_template is provided by the Framesail MCP server (https://api.framesail.com/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Framesail, and thousands of servers like it.
This server
Across the catalogue