Skip to content

update_formula_field strips format/precision typeOptions from the field #17

@doug-hue

Description

@doug-hue

Product

npm package (airtable-user-mcp)

Version

airtable-user-mcp 2.4.11

MCP Client (if applicable)

Claude Code (CLI)

OS

Windows 11 (primary repro); Mac (same version installed)

What happened?

Calling update_formula_field to update a formula body on a field that has format/precision typeOptions (e.g. PercentV2 with precision: 0) silently strips those typeOptions after the update. The formula is updated correctly, but the field's display format is reset to the default.

Reproducer:

  1. Have a formula field with a non-default format — for example, a Variance % field typed as PercentV2 with precision: 0.
  2. Call update_formula_field with the updated formula body. Do NOT pass typeOptions — the tool signature implies it handles formula bodies only.
  3. Observe the field after the call: the formula is updated, but the field is now typed as plain number (or base percent with default precision), not PercentV2 precision 0. The format/precision was stripped.

Observed:
Field format reverts to default after update_formula_field. No error is returned — the call succeeds with 200.

Expected:
update_formula_field should preserve existing typeOptions when it is not passed new ones, or at minimum document that callers must pass the full typeOptions to preserve format.

Workaround:
After calling update_formula_field, call update_field_config with the full typeOptions block (read from get_table_schema first) to restore the format. Example:

update_field_config({
  appId: "appXXXX",
  tableId: "tblXXXX",
  fieldId: "fldXXXX",
  typeOptions: { format: "percentV2", precision: 0 }
})

This restores the field format, but requires a second round-trip and a prior get_table_schema read to know the correct typeOptions.

Relevant logs or errors

# update_formula_field call — succeeds with 200, but strips typeOptions:
Tool: mcp__airtable-user-mcp__update_formula_field
Args: { "appId": "appXXXX", "tableId": "tblXXXX", "fieldId": "fldXXXX", "formula": "IF({earned} = 0, BLANK(), ({earned} - {actual}) / {earned})" }
Response: 200 SUCCESS

# Field before: PercentV2, precision 0
# Field after update_formula_field: percent (default), precision lost

# Remediation — update_field_config restores it:
Tool: mcp__airtable-user-mcp__update_field_config
Args: { "appId": "appXXXX", "tableId": "tblXXXX", "fieldId": "fldXXXX", "typeOptions": { "format": "percentV2", "precision": 0 } }
Response: 200 SUCCESS
# Field after update_field_config: PercentV2, precision 0 restored

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions