Get element schema
get_element_schemaReturn the schema for an element type's type_data, as TypeScript declarations. Call this before add_elements / update_elements when you don't already know the field shape for the element_type you're placing.
By default it is compact: every field with its type and a one-line note, plus the keyframable list. Ask about specific properties with fields: ['background_setting'] or query: 'pill background' — those come back with their full notes, default and an example; detail: 'full' returns everything, including the keyframe rules. Inside run_script it is a function like any tool: get_element_schema({element_type: 'text', query: 'line height'}) looks a property up mid-script.
Fields are listed in camelCase, the names get_clip returns. Where the tool descriptions write one in snake_case (font_setting, animation_setting), the field says so — (= font_setting) on fontSetting — and either spelling is accepted.
Pass element_type='group' for the GROUP surface instead — what a group is, how its pivot works, and the nine properties it can animate.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | 'add' returns required + optional fields; 'update' returns all-optional. | add |
| query | No | Words describing the property you want ('pill background', 'corner radius', 'line height'): returns the best-matching fields (up to 5) as `fields` would. | |
| detail | No | 'compact' (default): names, types and one-line notes. 'full': every field's full notes, nested docs and the keyframe rules. | |
| fields | No | Return only these fields, with their full notes, default and an example — text is 15KB whole, ~300 bytes for two. | |
| format | No | Defaults to 'declarations' — TypeScript-style, which is the better READ. Inside run_script it defaults to 'json' instead, because a script indexes into the structure and the declaration text would arrive newline-escaped. Set it explicitly to override either default. | |
| element_type | Yes | One of: text, callout, rectangle, arrow, blur, spotlight, zoom, image, video, animation, avatar, group |