Skip to main content
Glama

Add Sheet Field

sheet.add_attribute

Add a new attribute (field) to an existing sheet. Use during refinement (add a phone field). dataType MUST be a canonical Atwork name; for currency, pass dataType Number with description: "USD; whole numbers". Returns the new attributeId. For a Status/Select/Multi-Select field, pass the choices as options.items: [{title, color?, stage?}] — ids are generated server-side; on a Status field stage (Todo / InProgress / Complete) puts the choice in that stage, default Todo. Set isUnique: true on a field whose value identifies a row: item.create then dedupes on it. For a Relation to an existing sheet pass options.relatedSheetId (from workspace.structure) and twoWay: true to add the reverse field there too (default one-way). For a Code field (raw source with a language tag) pass options.language, one of: plain / html / json / typescript / javascript / sql / css / markdown. Computed fields name other fields, never ids: Formula takes options.formula with fields in braces ({Price} * {Quantity}); Mirror takes options.relation (a Relation field here) + options.field (on the related sheet); Rollup takes options.relation + options.function (COUNT / DISTINCT_COUNT / SUM / AVG / MIN / MAX) + options.field (a Number field there, not for COUNT); Rate takes options.stars; Pipeline takes options.stages; Summary takes options.template with fields in braces; Button takes options.workflow, the name of a manual-trigger workflow on this sheet. File List may take options.allowedFiles (any / images / documents / media / custom), options.allowedExtensions (with custom, e.g. ["pdf"]) and options.maxFiles (1–100). A name that does not exist is refused with the valid ones. Timer and DocX need nothing.

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": {
      "sheetId": "<sheetId>",
      "name": "<name>",
      "dataType": "<dataType>"
    },
    "name": "sheet.add_attribute"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
optionsNoChoices for Status / Select / Multi-Select fields, in display order — `language` for a Code field — `relatedSheetId` (+ `twoWay`) for a Relation — or the settings of a Formula, Mirror, Rollup, Rate, Pipeline, Summary or Button field.
sheetIdYes
dataTypeYes
isUniqueNoReject a second row with the same value; item.create then dedupes on this field. Only on Text / Number / Email / URL / PhoneNumber fields, and Text only with multiline off.
multilineNoText only: allow several lines (forms show a paragraph box, AI fill writes paragraphs). Defaults to false. Use Document for a full page per row.
descriptionNo

Output Schema

NameRequiredDescriptionDefault
attributeIdYesId of the new field

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / dataType / enum
      Previous value: -[
      -  "Short Text",
      -  "Long Text",
      -  "Number",
      -  "Date",
      -  "Email",
      -  "URL",
      -  "PhoneNumber",
      -  "CheckBox",
      -  "Status",
      -  "Select",
      -  "Multi-Select",
      -  "Employee",
      -  "Employee List",
      -  "Team",
      -  "Team List",
      -  "Job",
      -  "Job List",
      -  "Actor",
      -  "File List",
      -  "Document",
      -  "Location",
      -  "Address",
      -  "Duration",
      -  "Link",
      -  "Vote",
      -  "Goal",
      -  "Code",
      -  "Relation",
      -  "Formula",
      -  "Mirror",
      -  "Rollup",
      -  "Rate",
      -  "Timer",
      -  "Pipeline",
      -  "Summary",
      -  "DocX",
      -  "Button"
      -]New value: +[
      +  "Text",
      +  "Number",
      +  "Date",
      +  "Email",
      +  "URL",
      +  "PhoneNumber",
      +  "CheckBox",
      +  "Status",
      +  "Select",
      +  "Multi-Select",
      +  "Employee",
      +  "Employee List",
      +  "Team",
      +  "Team List",
      +  "Job",
      +  "Job List",
      +  "Actor",
      +  "File List",
      +  "Document",
      +  "Location",
      +  "Address",
      +  "Duration",
      +  "Link",
      +  "Vote",
      +  "Goal",
      +  "Short Text",
      +  "Long Text",
      +  "Code",
      +  "Relation",
      +  "Formula",
      +  "Mirror",
      +  "Rollup",
      +  "Rate",
      +  "Timer",
      +  "Pipeline",
      +  "Summary",
      +  "DocX",
      +  "Button"
      +]
    • changedInput schema / properties / isUnique / description
      Previous value: -"Reject a second row with the same value; item.create then dedupes on this field. Only on Short Text / Number / Email / URL / PhoneNumber fields."New value: +"Reject a second row with the same value; item.create then dedupes on this field. Only on Text / Number / Email / URL / PhoneNumber fields, and Text only with multiline off."
    • addedInput schema / properties / multiline
      Added value: +{
      +  "description": "Text only: allow several lines (forms show a paragraph box, AI fill writes paragraphs). Defaults to false. Use Document for a full page per row.",
      +  "type": "boolean"
      +}
  2. Changed3 schema fields changed
    • addedInput schema / properties / options / properties / allowedExtensions
      Added value: +{
      +  "description": "File List only: the extensions a Custom rule takes, without the dot, e.g. [\"pdf\", \"docx\"].",
      +  "items": {
      +    "maxLength": 11,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "maxItems": 30,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • addedInput schema / properties / options / properties / allowedFiles
      Added value: +{
      +  "description": "File List only: which files it takes; `media` is audio and video, `custom` takes allowedExtensions.",
      +  "enum": [
      +    "any",
      +    "images",
      +    "documents",
      +    "media",
      +    "custom"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / options / properties / maxFiles
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 100,
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "File List only: at most this many files (1–100); null removes the limit."
      +}
  3. Changed1 schema field changed
    • changedInput schema / properties / dataType / enum
      Previous value: -[
      -  "Short Text",
      -  "Long Text",
      -  "Number",
      -  "Date",
      -  "DateRange",
      -  "Email",
      -  "URL",
      -  "PhoneNumber",
      -  "CheckBox",
      -  "Status",
      -  "Select",
      -  "Multi-Select",
      -  "Employee",
      -  "Employee List",
      -  "Team",
      -  "Team List",
      -  "Job",
      -  "Job List",
      -  "Actor",
      -  "File List",
      -  "Document",
      -  "Location",
      -  "Address",
      -  "Duration",
      -  "Link",
      -  "Vote",
      -  "Goal",
      -  "Code",
      -  "Relation",
      -  "Formula",
      -  "Mirror",
      -  "Rollup",
      -  "Rate",
      -  "Timer",
      -  "Pipeline",
      -  "Summary",
      -  "DocX",
      -  "Button"
      -]New value: +[
      +  "Short Text",
      +  "Long Text",
      +  "Number",
      +  "Date",
      +  "Email",
      +  "URL",
      +  "PhoneNumber",
      +  "CheckBox",
      +  "Status",
      +  "Select",
      +  "Multi-Select",
      +  "Employee",
      +  "Employee List",
      +  "Team",
      +  "Team List",
      +  "Job",
      +  "Job List",
      +  "Actor",
      +  "File List",
      +  "Document",
      +  "Location",
      +  "Address",
      +  "Duration",
      +  "Link",
      +  "Vote",
      +  "Goal",
      +  "Code",
      +  "Relation",
      +  "Formula",
      +  "Mirror",
      +  "Rollup",
      +  "Rate",
      +  "Timer",
      +  "Pipeline",
      +  "Summary",
      +  "DocX",
      +  "Button"
      +]
  4. Changed11 schema fields changed
    • changedInput schema / properties / dataType / enum
      Previous value: -[
      -  "Short Text",
      -  "Long Text",
      -  "Number",
      -  "Date",
      -  "DateRange",
      -  "Email",
      -  "URL",
      -  "PhoneNumber",
      -  "CheckBox",
      -  "Status",
      -  "Select",
      -  "Multi-Select",
      -  "Employee",
      -  "Employee List",
      -  "Team",
      -  "Team List",
      -  "Job",
      -  "Job List",
      -  "Actor",
      -  "File List",
      -  "Document",
      -  "Location",
      -  "Address",
      -  "Duration",
      -  "Link",
      -  "Vote",
      -  "Goal",
      -  "Code",
      -  "Relation"
      -]New value: +[
      +  "Short Text",
      +  "Long Text",
      +  "Number",
      +  "Date",
      +  "DateRange",
      +  "Email",
      +  "URL",
      +  "PhoneNumber",
      +  "CheckBox",
      +  "Status",
      +  "Select",
      +  "Multi-Select",
      +  "Employee",
      +  "Employee List",
      +  "Team",
      +  "Team List",
      +  "Job",
      +  "Job List",
      +  "Actor",
      +  "File List",
      +  "Document",
      +  "Location",
      +  "Address",
      +  "Duration",
      +  "Link",
      +  "Vote",
      +  "Goal",
      +  "Code",
      +  "Relation",
      +  "Formula",
      +  "Mirror",
      +  "Rollup",
      +  "Rate",
      +  "Timer",
      +  "Pipeline",
      +  "Summary",
      +  "DocX",
      +  "Button"
      +]
    • changedInput schema / properties / options / description
      Previous value: -"Choices for Status / Select / Multi-Select fields, in display order — `language` for a Code field — or `relatedSheetId` (+ `twoWay`) for a Relation."New value: +"Choices for Status / Select / Multi-Select fields, in display order — `language` for a Code field — `relatedSheetId` (+ `twoWay`) for a Relation — or the settings of a Formula, Mirror, Rollup, Rate, Pipeline, Summary or Button field."
    • addedInput schema / properties / options / properties / field
      Added value: +{
      +  "description": "Mirror: the related sheet's field to show. Rollup: the Number field to aggregate (not for COUNT).",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / options / properties / formula
      Added value: +{
      +  "description": "Formula only: fields in braces, e.g. `{Price} * {Quantity}`; functions IF, round, days_between…",
      +  "maxLength": 2000,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / options / properties / function
      Added value: +{
      +  "description": "Rollup only: how the related rows are aggregated.",
      +  "enum": [
      +    "COUNT",
      +    "DISTINCT_COUNT",
      +    "SUM",
      +    "AVG",
      +    "MIN",
      +    "MAX"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / options / properties / relation
      Added value: +{
      +  "description": "Mirror / Rollup only: the name of a Relation field on this sheet.",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / options / properties / returnType
      Added value: +{
      +  "description": "Formula only: what it returns. Default number.",
      +  "enum": [
      +    "number",
      +    "text"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / options / properties / stages
      Added value: +{
      +  "description": "Pipeline only: the stages in order; won stages `succeed`, lost ones `failed`.",
      +  "items": {
      +    "properties": {
      +      "color": {
      +        "type": "string"
      +      },
      +      "outcome": {
      +        "description": "Default open",
      +        "enum": [
      +          "open",
      +          "succeed",
      +          "failed"
      +        ],
      +        "type": "string"
      +      },
      +      "title": {
      +        "maxLength": 80,
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "title"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 30,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • addedInput schema / properties / options / properties / stars
      Added value: +{
      +  "description": "Rate only: number of stars (2–20), default 5.",
      +  "maximum": 20,
      +  "minimum": 2,
      +  "type": "integer"
      +}
    • addedInput schema / properties / options / properties / template
      Added value: +{
      +  "description": "Summary only: text with fields in braces, e.g. `{Company} — {Stage}`.",
      +  "maxLength": 4000,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / options / properties / workflow
      Added value: +{
      +  "description": "Button only: the name of a workflow on this sheet with a manual trigger.",
      +  "minLength": 1,
      +  "type": "string"
      +}
  5. First observed

TDQS

A4.6/5.0
Behavior5/5

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

The annotations only declare the mutation/safety profile, and the description goes well beyond them: it states the return value ('Returns the new attributeId'), that choice ids are generated server-side, the default behaviors (Status stage defaults to Todo, Relation default one-way, twoWay adds the reverse field), the interaction with item.create dedup via isUnique, and the failure mode ('A name that does not exist is refused with the valid ones'). That is exactly the kind of server-side behavior an agent could not infer from readOnlyHint=false / destructiveHint=false.

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?

Purpose, an example, the return value and the per-dataType rules are front-loaded in a logical order, and almost every clause carries actionable guidance. It is a dense, unbroken paragraph, and a few details restate schema enums verbatim (the full language list, the Rollup function list), which is mild redundancy rather than added meaning.

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 complex field-creation tool with nested options and 37 possible dataTypes, the description covers the branch points an agent must get right, and an output schema exists so the return shape needs no prose. What is left open is duplicate-name behavior (notable given idempotentHint=false) and any access/precondition requirements on the target sheet.

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

Parameters5/5

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

Schema description coverage is only 43%, but the description compensates by explaining nearly every nested option: options.items shape with title/color/stage, options.relatedSheetId + twoWay, options.language values, and the distinct option sets for Formula ({Field} braces), Mirror (relation + field), Rollup (relation + function + field, with the COUNT exception), Rate (stars), Pipeline (stages), Summary (template), Button (workflow) and File List (allowedFiles/allowedExtensions/maxFiles). It also clarifies the canonical dataType naming and how arbitrary names are rejected, which the enum alone does not convey.

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?

The first sentence gives a specific verb plus resource ('Add a new attribute (field) to an existing sheet') and is immediately distinguishable from the sibling mutation tools sheet.update_attribute, sheet.remove_attribute and sheet.restore_attribute by the word 'Add'. The follow-up clause names the concrete workflow it belongs to ('Use during refinement (`add a phone field`)'), so an agent knows exactly what operation this performs.

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

Usage Guidelines4/5

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

It supplies clear usage context (field creation during refinement) plus a worked example, and it explains per-dataType selection rules that function as when-to-use guidance (e.g. 'for currency, pass dataType `Number` with `description: "USD; whole numbers"`', 'Use Document for a full page per row' appears in the schema). It stops short of explicit when-not guidance, such as routing the agent to sheet.update_attribute for changing an existing field, and there is no warning about repeated invocation despite idempotentHint=false.

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