Skip to main content
Glama
felores

Airtable MCP Server

update_field

Modify field properties in Airtable, including name, description, and configuration options, to adapt database structures as project requirements evolve.

Instructions

Update a field in a table

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
base_idYesID of the base
table_idYesID of the table
field_idYesID of the field to update
updatesYes

Implementation Reference

  • The handler function for the 'update_field' tool. It extracts parameters from the request, makes a PATCH request to the Airtable API to update the field, and returns the response as text content.
    case "update_field": {
      const { base_id, table_id, field_id, updates } = request.params.arguments as {
        base_id: string;
        table_id: string;
        field_id: string;
        updates: Partial<FieldOption>;
      };
      
      const response = await this.axiosInstance.patch(
        `/meta/bases/${base_id}/tables/${table_id}/fields/${field_id}`,
        updates
      );
      
      return {
        content: [{
          type: "text",
          text: JSON.stringify(response.data, null, 2),
        }],
      };
    }
  • The tool registration and input schema definition for 'update_field' returned by the list_tools handler.
    {
      name: "update_field",
      description: "Update a field in a table",
      inputSchema: {
        type: "object",
        properties: {
          base_id: {
            type: "string",
            description: "ID of the base",
          },
          table_id: {
            type: "string",
            description: "ID of the table",
          },
          field_id: {
            type: "string",
            description: "ID of the field to update",
          },
          updates: {
            type: "object",
            properties: {
              name: {
                type: "string",
                description: "New name for the field",
              },
              description: {
                type: "string",
                description: "New description for the field",
              },
              options: {
                type: "object",
                description: "New field-specific options",
              },
            },
          },
        },
        required: ["base_id", "table_id", "field_id", "updates"],
      },
    },
  • Type definition for FieldOption used in the updates parameter (as Partial<FieldOption>) for the update_field tool.
    export interface FieldOption {
      name: string;
      type: FieldType;
      description?: string;
      options?: Record<string, any>;
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/felores/airtable-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server