Add Sheet Field
sheet.add_attributeAdd 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
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| options | No | 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. | |
| sheetId | Yes | ||
| dataType | Yes | ||
| isUnique | No | 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. | |
| multiline | No | 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. | |
| description | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| attributeId | Yes | Id of the new field |