Skip to main content
Glama
felores

Airtable MCP Server

by felores

create_field

Add a new field to an Airtable table by specifying the field name, type, and optional description or options to customize your database structure.

Instructions

Create a new field in a table

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
base_idYesID of the base
table_idYesID of the table
fieldYes

Implementation Reference

  • Handler function for the 'create_field' tool. It validates the field input and sends a POST request to the Airtable metadata API to create a new field in the specified table.
    case "create_field": {
      const { base_id, table_id, field } = request.params.arguments as {
        base_id: string;
        table_id: string;
        field: FieldOption;
      };
      
      // Validate field before creation
      const validatedField = this.validateField(field);
      
      const response = await this.axiosInstance.post(
        `/meta/bases/${base_id}/tables/${table_id}/fields`,
        validatedField
      );
      
      return {
        content: [{
          type: "text",
          text: JSON.stringify(response.data, null, 2),
        }],
      };
    }
  • src/index.ts:174-213 (registration)
    Tool registration in the list of available tools, including name, description, and detailed input schema definition.
    {
      name: "create_field",
      description: "Create a new 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: {
            type: "object",
            properties: {
              name: {
                type: "string",
                description: "Name of the field",
              },
              type: {
                type: "string",
                description: "Type of the field",
              },
              description: {
                type: "string",
                description: "Description of the field",
              },
              options: {
                type: "object",
                description: "Field-specific options",
              },
            },
            required: ["name", "type"],
          },
        },
        required: ["base_id", "table_id", "field"],
      },
    },
  • Helper function to validate and normalize field options before creation, removing unnecessary options or adding defaults based on field type.
    private validateField(field: FieldOption): FieldOption {
      const { type } = field;
    
      // Remove options for fields that don't need them
      if (!fieldRequiresOptions(type as FieldType)) {
        const { options, ...rest } = field;
        return rest;
      }
    
      // Add default options for fields that require them
      if (!field.options) {
        return {
          ...field,
          options: getDefaultOptions(type as FieldType),
        };
      }
    
      return field;
    }
  • Type definition for FieldOption used in create_field input.
    export interface FieldOption {
      name: string;
      type: FieldType;
      description?: string;
      options?: Record<string, any>;
    }
  • Helper function determining if a field type requires options, used in validation.
    export const fieldRequiresOptions = (type: FieldType): boolean => {
      switch (type) {
        case 'number':
        case 'singleSelect':
        case 'multiSelect':
        case 'date':
        case 'currency':
          return true;
        default:
          return false;
      }
    };
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states this is a creation operation but doesn't mention whether it requires specific permissions, what happens on success/failure, whether it's idempotent, or any rate limits. For a mutation tool with zero annotation coverage, this leaves significant behavioral gaps for the agent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that efficiently communicates the core purpose. There's no wasted language or unnecessary elaboration. It's appropriately sized for a tool with a straightforward purpose, though the brevity comes at the cost of completeness in other dimensions.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations, no output schema, and incomplete parameter documentation, the description is inadequate. It doesn't explain what happens after creation, what the response looks like, error conditions, or how this tool fits into the broader context of the Airtable-like system. The agent lacks crucial information to use this tool effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 67%, with the 'field' object having detailed properties documented in the schema. The description doesn't add any parameter information beyond what's in the schema - it doesn't explain what 'base_id' or 'table_id' refer to, what field types are available, or provide examples. With moderate schema coverage, the baseline 3 is appropriate as the description doesn't compensate for the coverage gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Create') and resource ('new field in a table'), making the purpose immediately understandable. It distinguishes this tool from siblings like 'create_record' or 'create_table' by specifying it creates a field rather than a record or table. However, it doesn't specify what kind of field or provide additional context about the field types available.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (like needing a base and table first), when not to use it, or how it relates to sibling tools like 'update_field' or 'create_table'. The agent must infer usage from the tool name and schema alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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