update_entity
Modifies one existing ERD entity (kind='entity'): name, desc, colorKey, geometry (x, y, width, height) and kindMetadata (the Postgres chips: schemaNamespace, rlsPolicy, piiFields, expectedRowCount). Only the fields provided change, except kindMetadata, which REPLACES the whole block: the complete block is expected ({} clears everything, an absent kindMetadata leaves it untouched). Columns belong to update_field (one) and add_field (a new one); relations belong to update_relation. The entity's id and parent cannot be changed. Placement belongs to the layout engine: with x/y absent, auto_layout_mcd (or the post-call tidy-up) places the entity, and either can recompute a hand-set position. A rename does not rename the SQL table: generated SQL names the table from the entity id. REFUSED with an error, nothing written, on an unknown id or a block that is not an ERD entity. add_entity creates an entity, delete_entity removes one with everything that depends on it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | New X position in pixels; with x/y absent, auto_layout_mcd places the entity | |
| y | No | New Y position in pixels; with x/y absent, auto_layout_mcd places the entity | |
| id | Yes | ID of the entity to modify (a block with kind='entity'; it never changes) | |
| desc | No | New short description of the entity | |
| name | No | New display name (the SQL table name follows the entity id, not this name) | |
| width | No | New width in pixels | |
| height | No | New height in pixels | |
| colorKey | No | New color of the entity (ColorKey) | |
| kindMetadata | No | Postgres metadata of the table: schemaNamespace (chip 'auth.users'), rlsPolicy (chip 🔒 + DDL export), piiFields (GDPR), expectedRowCount. REPLACES the existing block; {} clears everything, an omitted field is not touched. | |
| expectedProjectId | No | UUID of the project targeted by THIS call. ACTUALLY targets this project instead of the session project. Refused without changing anything if access is not granted. |