# 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.

Agent View of the PolicyLayer registry record for `piece_template_create`. HTML page: https://policylayer.com/tools/breakpoint-mcp/piece-template-create

## Facts

- Tool: `piece_template_create`
- Server: Breakpoint (`breakpoint-mcp`) — https://policylayer.com/tools/breakpoint-mcp.md
- Install: `npx -y breakpoint-mcp`
- Homepage: https://www.npmjs.com/package/breakpoint-mcp
- Risk category: Write (Medium risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 12 (2 required)
- Recommended policy verdict: Rate-limited

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `art` | string | no | res:// texture bound to the Art node at build time |
| `back` | object | no | 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 | no | Default Art tint (self_modulate), #RRGGBB or #RRGGBBAA |
| `label` | boolean | no | Include a Label child for the piece name (default true) |
| `confirm` | boolean | no | Auto-approve this destructive action (skip the confirmation prompt) |
| `hit_area` | object | no | Optional Area2D + CollisionShape2D for hit-testing |
| `overwrite` | boolean | no | Overwrite an existing template at `path` (default false) |
| `root_type` | string | no | Root node type (default Node2D → Sprite2D art; Control → TextureRect art) |
| `label_text` | string | no | Static Label text shown before any data is bound |
| `script_path` | string | no | Generated piece script path (default derives from `path`) |

Parameters from the server's own tool schema.

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "piece_template_create",
    "arguments": {
      "path": "<path>",
      "size": {}
    }
  }
}
```

## 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 own 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 signals: Accepts file system path (path) · High parameter count (17 properties) · Admin/system-level operation

## Use case

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.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Breakpoint:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "piece_template_create": {
      "limits": [
        {
          "counter": "piece_template_create_rate",
          "window": "minute",
          "max": 30,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on Breakpoint (273)

- `anim_delete` — Destructive — https://policylayer.com/tools/breakpoint-mcp/anim-delete.md
- `anim_remove_key` — Destructive — https://policylayer.com/tools/breakpoint-mcp/anim-remove-key.md
- `filesystem_move` — Destructive — https://policylayer.com/tools/breakpoint-mcp/filesystem-move.md
- `gd_rename` — Destructive — https://policylayer.com/tools/breakpoint-mcp/gd-rename.md
- `inputmap_erase_action` — Destructive — https://policylayer.com/tools/breakpoint-mcp/inputmap-erase-action.md
- `mp_wire_rpc` — Destructive — https://policylayer.com/tools/breakpoint-mcp/mp-wire-rpc.md
- `node_delete` — Destructive — https://policylayer.com/tools/breakpoint-mcp/node-delete.md
- `project_remove_autoload` — Destructive — https://policylayer.com/tools/breakpoint-mcp/project-remove-autoload.md
- `resource_save` — Destructive — https://policylayer.com/tools/breakpoint-mcp/resource-save.md
- `resource_set_import_settings` — Destructive — https://policylayer.com/tools/breakpoint-mcp/resource-set-import-settings.md
- `runtime_node_remove` — Destructive — https://policylayer.com/tools/breakpoint-mcp/runtime-node-remove.md
- `runtime_peer_stop` — Destructive — https://policylayer.com/tools/breakpoint-mcp/runtime-peer-stop.md
- `scene_close` — Destructive — https://policylayer.com/tools/breakpoint-mcp/scene-close.md
- `scene_reload` — Destructive — https://policylayer.com/tools/breakpoint-mcp/scene-reload.md
- `shader_set_code` — Destructive — https://policylayer.com/tools/breakpoint-mcp/shader-set-code.md
- `tilemap_clear` — Destructive — https://policylayer.com/tools/breakpoint-mcp/tilemap-clear.md
- `vcs_restore` — Destructive — https://policylayer.com/tools/breakpoint-mcp/vcs-restore.md
- `vcs_stash` — Destructive — https://policylayer.com/tools/breakpoint-mcp/vcs-stash.md
- `cs_dbg_attach` — Execute — https://policylayer.com/tools/breakpoint-mcp/cs-dbg-attach.md
- `cs_dbg_continue` — Execute — https://policylayer.com/tools/breakpoint-mcp/cs-dbg-continue.md
- `cs_dbg_launch` — Execute — https://policylayer.com/tools/breakpoint-mcp/cs-dbg-launch.md
- `cs_dbg_restart` — Execute — https://policylayer.com/tools/breakpoint-mcp/cs-dbg-restart.md
- `cs_dbg_set_breakpoints` — Execute — https://policylayer.com/tools/breakpoint-mcp/cs-dbg-set-breakpoints.md
- `cs_dbg_set_exception_breakpoints` — Execute — https://policylayer.com/tools/breakpoint-mcp/cs-dbg-set-exception-breakpoints.md
- `cs_dbg_set_variable` — Execute — https://policylayer.com/tools/breakpoint-mcp/cs-dbg-set-variable.md
- `cs_dbg_step` — Execute — https://policylayer.com/tools/breakpoint-mcp/cs-dbg-step.md
- `dbg_attach` — Execute — https://policylayer.com/tools/breakpoint-mcp/dbg-attach.md
- `dbg_continue` — Execute — https://policylayer.com/tools/breakpoint-mcp/dbg-continue.md
- `dbg_data_breakpoints` — Execute — https://policylayer.com/tools/breakpoint-mcp/dbg-data-breakpoints.md
- `dbg_goto` — Execute — https://policylayer.com/tools/breakpoint-mcp/dbg-goto.md
- …and 243 more: https://policylayer.com/tools/breakpoint-mcp.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=breakpoint-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/breakpoint-mcp
