Skip to main content
Glama

Add Field To Record Layout

peek.add_layout_item

Append (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

NameRequiredDescriptionDefault
typeYes
indexNo
tabIdNo
titleNo
peekIdNo
columnsNo
displayNo
maxRowsNo
tabTitlesNo
isRequiredNo
underTitleNo
attributeCodeNo
requiredColumnsNo

Output Schema

NameRequiredDescriptionDefault
okYes
layoutItemIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / type / enum
      Previous value: -[
      -  "attribute",
      -  "tabs",
      -  "related_rows",
      -  "history",
      -  "comments",
      -  "header",
      -  "welcome",
      -  "submit"
      -]New value: +[
      +  "attribute",
      +  "tabs",
      +  "related_rows",
      +  "history",
      +  "comments",
      +  "files",
      +  "header",
      +  "welcome",
      +  "submit"
      +]
  2. Changed3 schema fields changed
    • addedInput schema / properties / columns
      Added value: +{
      +  "items": {
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "maxItems": 20,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • addedInput schema / properties / maxRows
      Added value: +{
      +  "maximum": 50,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / requiredColumns
      Added value: +{
      +  "items": {
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  3. Changed1 schema field changed
    • addedInput schema / properties / underTitle
      Added value: +{
      +  "type": "boolean"
      +}
  4. Changed4 schema fields changed
    • addedInput schema / properties / display
      Added value: +{
      +  "enum": [
      +    "list",
      +    "table"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / tabId
      Added value: +{
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / tabTitles
      Added value: +{
      +  "items": {
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "maxItems": 8,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • changedInput schema / properties / type / enum
      Previous value: -[
      -  "attribute",
      -  "header",
      -  "welcome",
      -  "history",
      -  "comments",
      -  "submit"
      -]New value: +[
      +  "attribute",
      +  "tabs",
      +  "related_rows",
      +  "history",
      +  "comments",
      +  "header",
      +  "welcome",
      +  "submit"
      +]
  5. Added

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only say it is a non-readonly, non-idempotent, non-destructive mutation. The description adds real behavioral facts beyond that: forms are refused for all but 'related_rows', legacy item types are rejected, a field already on the layout is moved rather than duplicated, and underTitle accepts at most four short fields of specific kinds. These constraints materially change how an agent must call the tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core operation and the form-refusal caveat are front-loaded in the first sentence, which is the right structure. The remainder is a single dense parenthetical chain with nested parentheses that is harder to scan than a bulleted form, though nearly every clause carries distinct, non-redundant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 13-parameter mutation tool this is unusually complete, and the existing output schema means return values need not be explained. The remaining shortfall is the three undescribed parameters (`title`, `peekId`, `isRequired`) and no statement of what happens to an existing layout on failure or whether the operation is atomic.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage across 13 parameters, the description does the heavy lifting: it explains `type` values, `index`, `tabId` provenance ('from peek.read'), `attributeCode` source ('sheet.schema or peek.read'), `tabTitles` 1-8, `display`, `columns` defaults ('first 6 fillable'), `requiredColumns`, `maxRows` 1-50, and `underTitle`. However `title`, `peekId`, and `isRequired` are never mentioned, leaving three parameters undocumented in both schema and description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb and resource ('Append (or insert at `index`) an item into a record layout') and immediately clarifies the scope with 'how a row opens; a form is refused'. It also names the corrective sibling ('change its questions with form.update'), so an agent can distinguish this from the form-editing path without consulting either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use routing per item type ('attribute', 'tabs', 'related_rows', 'history', 'comments', 'files') including which parameters each type needs. It also states exclusions ('header', 'welcome' and 'submit' are legacy form items and are refused on a record layout') and the one exception on forms, which is exactly the kind of conditional routing an agent needs.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources