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
| Name | Required | Description | Default |
|---|---|---|---|
| base_id | Yes | ID of the base | |
| table_id | Yes | ID of the table | |
| field_id | Yes | ID of the field to update | |
| updates | Yes |
Implementation Reference
- src/index.ts:489-508 (handler)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), }], }; }
- src/index.ts:214-252 (schema)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"], }, },
- src/types.ts:15-20 (schema)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>; }