smartsuite_create_field
Create a field of any type in a SmartSuite application, including rollup, lookup, count, and AI-populated fields. Supply field type and label; add params only when needed.
Instructions
Create a field of any type in an application (including rollup and lookup fields — not just formulas). Requires readwrite/admin mode AND SMARTSUITE_ENABLE_SCHEMA_WRITE=true. You supply fieldType + label and an OPTIONAL sparse params object; SmartSuite fills type defaults, so most fields need no params. Provide params only where they matter, e.g.: singleselectfield/multipleselectfield/statusfield → {choices:[{label, value?, value_help_text?, weight?}]} where value is the stored option key (omit it and one is derived from the label, e.g. "Ready for Review" → "ready_for_review"; SmartSuite itself silently stores NO options for a choice that reaches it without a value) where value_help_text is the option DESCRIPTION shown in the dropdown and weight is its NUMERIC value (used by formulas/rollups); e.g. {choices:[{label:"High", value_help_text:"Ship this week", weight:3}]}. Choice colors and order are auto-assigned if omitted so the dropdown renders correctly (status choices take no weight/description); linkedrecordfield → {linked_application:"", entries_allowed:"single"|"multiple"} (REQUIRED — without it SmartSuite creates the field with a null target and an error badge, and still reports success; camelCase linkedApplication, as returned by describe_application, is accepted and converted; the reciprocal backlink field is auto-created on the target table immediately, but its VALUES are populated asynchronously — measured 15-45s after a link is written, so a read-back sooner than that shows [] on the reciprocal side and is not a failure); rollupfield → {linked_field:"", field_selection:"", function: exactly one of "sum"|"min"|"max"|"average"|"range" — there are no others. These are the only tokens that compute: SmartSuite accepts ANY string here without error and the field then returns null on every record, so a guessed token yields a field that looks valid and is silently empty. There is no "count" rollup (use a countfield to count linked records) and no "concatenate" (use a formula field with ARRAYJOIN([link].[field], "; ")). field_selection must point at a numeric field — a non-numeric target leaves the rollup invalid; lookupfield → {linked_field, field_selection}; countfield → {linked_field:""} — THE way to count linked records (there is no rollup "count"). SmartSuite fills every other default; add suffix/prefix/color to label the number, and field_filter:{operator:"and"|"or", fields:[{field, comparison, value}]} with include_filters:true for a CONDITIONAL count (e.g. only linked records whose status is not complete); numberfield → {precision, separator}; currencyfield → {currency:"USD"}; textfield → {max_length}. (For formula fields use smartsuite_create_formula_field.) AI FIELDS: to make a field AI-populated, pass aiPrompt — a plain-text prompt where {{field_slug}} inserts a live reference to another field (e.g. "Summarize {{title}} for {{s096c9e74e}}"). The tool builds the correct rich-text instructions with field-reference pills and enables the AI agent. The agent's OTHER settings go in params.ai_agent and are honoured as passed — name them explicitly, because the defaults matter: enable_internet_search (DEFAULT FALSE — an agent asked to find something online or cite a source cannot search unless you set this true, and will invent the answer), run_automatically (defaults true — the agent fills the field when a record is saved), and model (a credential reference of the form "cred:"; list them with smartsuite_list_automation_credentials). (This is the reliable way to set dynamic AI prompts — do NOT hand-build ai_agent.instructions.) The slug is generated and the field is placed in the record-view layout. Dry-run preview unless confirm:true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| label | Yes | Field display label. | |
| params | No | Optional sparse field params; omit to accept type defaults. See the tool description for which params each type needs. | |
| confirm | No | Must be true to create (default false = preview). | |
| aiPrompt | No | Optional: make this an AI-populated field. Plain-text prompt where {{field_slug}} inserts a live reference to another field. The tool builds the rich-text AI instructions (with field pills) and enables the AI agent. | |
| fieldType | Yes | SmartSuite field type, e.g. textfield, textareafield, richtextareafield, numberfield, currencyfield, percentfield, datefield, duedatefield, singleselectfield, multipleselectfield, statusfield, yesnofield, linkedrecordfield, userfield, emailfield, phonefield, linkfield, filefield, addressfield, ratingfield, durationfield, timefield, checklistfield, tagsfield, colorpickerfield. | |
| applicationId | Yes | The application (table) ID. |