ensure_block
Creates a block only if no block of the same type already exists in the kit, preventing duplicates. Returns the existing or new block ID.
Instructions
PREFERRED over add_block. Idempotent block creation: if a block of the given type already exists in the kit, returns its block_id without creating a duplicate. If no matching block exists, creates one and returns the new block_id. Use this for every block in your workflow so re-runs and retries never produce extra blocks. The "created" field in the response tells you whether a new block was created (true) or an existing one was returned (false).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kit_id | Yes | Kit UUID | |
| type | Yes | Block type | |
| name | No | Custom display name. Only applied when a new block is created; ignored when an existing block is returned. |