Add Field To Record Layout
peek.add_layout_itemAppend (or insert at index) an item into a record layout (how a row opens; a form is refused: change its questions with form.update). Types: 'attribute' (a field; pass attributeCode, one of the sheet's field codes from sheet.schema or peek.read), 'tabs' (a Tabs block; pass tabTitles, 1-8), 'related_rows' (the rows a Relation field links to; pass the Relation field's attributeCode and display list | table; on a form it is the one item allowed: visitors add new rows to the related sheet, filling columns (related field codes; default its first 6 fillable), with requiredColumns and maxRows 1-50), 'history' (the row's change history), 'comments' (the row's comments), 'files' (the row's files from its File List fields, comments and documents). Pass tabId (from peek.read) to put any item inside that tab. Pass underTitle: true with type 'attribute' to show the field on the line under the record's title, at its end (at most 4 short fields: Status, Select, Date, Number, Email, Text, Modified at…; a field already on the layout moves there). 'header', 'welcome' and 'submit' are legacy form items and are refused on a record layout.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"type": "<type>"
},
"name": "peek.add_layout_item"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | ||
| index | No | ||
| tabId | No | ||
| title | No | ||
| peekId | No | ||
| columns | No | ||
| display | No | ||
| maxRows | No | ||
| tabTitles | No | ||
| isRequired | No | ||
| underTitle | No | ||
| attributeCode | No | ||
| requiredColumns | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| layoutItemId | Yes |