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), 'history' (the row's change history), 'comments' (the row's comments). 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, Short 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.

Input Schema

NameRequiredDescriptionDefault
typeYes
indexNo
tabIdNo
titleNo
peekIdNo
displayNo
tabTitlesNo
isRequiredNo
underTitleNo
attributeCodeNo

Output Schema

NameRequiredDescriptionDefault
okYes
layoutItemIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / underTitle
      Added value: +{
      +  "type": "boolean"
      +}
  2. 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"
      +]
  3. Added

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations (which only say non-readOnly, non-idempotent, non-destructive), the description discloses real behavioral traits: append-vs-index insertion semantics, hard limits (max 8 tabs, at most 4 short fields under the title), allowed field kinds for the under-title line, and the side effect that a field already on the layout is moved rather than duplicated. It also declares refusals that would otherwise surface as runtime errors.

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?

Front-loaded with the action and the form exclusion, then organized by type; nearly every clause adds a fact. It is one dense paragraph rather than a scannable list, which makes the per-type requirements slower to extract for a 10-parameter tool.

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 mutating layout tool with an output schema and existing annotations, this covers placement, limits, per-type payloads, and refusal cases thoroughly. The remaining gap is the unexplained `peekId`/`title`/`isRequired` parameters, which matter for a tool whose siblings (peek.read, peek.reorder_layout) also key off a layout identifier.

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, the description carries the full burden and does so for `type`, `index`, `tabId`, `attributeCode`, `tabTitles`, `display`, and `underTitle`, including enum meanings and their source (sheet.schema, peek.read). However, `title`, `peekId`, and `isRequired` are never explained, so an agent must guess the record/layout identifier and the required-field flag.

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?

States a specific verb and resource ('Append (or insert at index) an item into a record layout') and immediately distinguishes it from the adjacent form-related operations by declaring that forms are refused and should be edited with form.update. An agent can tell this apart from peek.reorder_layout and peek.remove_layout_item without opening any 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?

Guidance is itemized per type: which `type` value to use, which companion parameter each requires (`attributeCode`, `tabTitles` 1-8, `display` list|table), when to pass `tabId`, and when to use `underTitle`. It also names the exclusion (legacy 'header'/'welcome'/'submit' are refused here) and routes the agent to form.update and peek.read instead.

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