piece_template_create
Build a reusable piece (token) scene from a spec: an Art node (Sprite2D under a Node2D root, TextureRect under a Control root), an optional Label, an optional hit area (Area2D + CollisionShape2D), and an optional two-sided Back, plus a generated script-backed set_data() / set_face(). set_data bin...
This record as markdown: /tools/breakpoint-mcp/piece-template-create.md
What piece_template_create does on Breakpoint
AI agents use piece_template_create to create or update resources in Breakpoint, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Breakpoint environment.
| Parameter | Type | Required | Description |
|---|---|---|---|
art | string | — | res:// texture bound to the Art node at build time |
back | object | — | Optional back state; its presence makes the piece two-sided |
path | string | Yes | Where to save the template scene, e.g. res://ui/pieces/Piece.tscn |
size | object | Yes | Token size in px (drives the hit-area extents and, for a Control root, the Art size) |
color | string | — | Default Art tint (self_modulate), #RRGGBB or #RRGGBBAA |
label | boolean | — | Include a Label child for the piece name (default true) |
confirm | boolean | — | Auto-approve this destructive action (skip the confirmation prompt) |
hit_area | object | — | Optional Area2D + CollisionShape2D for hit-testing |
overwrite | boolean | — | Overwrite an existing template at `path` (default false) |
root_type | string | — | Root node type (default Node2D → Sprite2D art; Control → TextureRect art) |
label_text | string | — | Static Label text shown before any data is bound |
script_path | string | — | Generated piece script path (default derives from `path`) |
Parameters from the server's own tool schema.
Why piece_template_create is rated Medium
The tool creates new scene files and scripts by decomposing into multiple write operations (scene.new, node.add, resource.create, scene.save). While the description uses the word 'DESTRUCTIVE', this is misleading—the tool does not delete or overwrite existing data irreversibly. Instead, it creates new assets (scene files and generated scripts) in a reversible manner.
From the tool's definition Build a reusable piece (token) scene from a spec... Decomposes onto scene.new → node.add → node.set_property → resource.create → scene.save. DESTRUCTIVE (writes a scene + script) — gated by confirmation.
Risk signalsAccepts file system path (path) · High parameter count (17 properties) · Admin/system-level operation
Attacks that exploit this kind of access
The rule that runs piece_template_create safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Breakpoint, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For piece_template_create, this is the rule to start with:
piece_template_create 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 Breakpoint, apply this rule, and every piece_template_create call is checked against it from then on.
Questions about piece_template_create
Build a reusable piece (token) scene from a spec: an Art node (Sprite2D under a Node2D root, TextureRect under a Control root), an optional Label, an optional hit area (Area2D + CollisionShape2D), and an optional two-sided Back, plus a generated script-backed set_data() / set_face(). set_data binds art / color / label; set_face flips face/back visibility. Decomposes onto scene.new → node.add → node.set_property → resource.create → scene.save. DESTRUCTIVE (writes a scene + script) — gated by confirmation. Returns the scene path + the created-node map. It is categorised as a Write tool in the Breakpoint MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
piece_template_create accepts 12 parameters: art, back, path, size, color, label, confirm, hit_area, overwrite, root_type, label_text, script_path. Required: path, size. The full parameter table on this page comes from the server's own tool schema.
Register the Breakpoint MCP server in PolicyLayer and add a rule for piece_template_create: 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 Breakpoint. Nothing to install.
piece_template_create 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 piece_template_create 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 piece_template_create. 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.
piece_template_create is provided by the Breakpoint MCP server (breakpoint-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Breakpoint, and thousands of servers like it.
This server
Across the catalogue