Skip to main content
Glama
onimsha

Airtable OAuth MCP Server

by onimsha

create_records

Add multiple entries to an Airtable table using the MCP server's standardized interface with OAuth authentication.

Instructions

Create multiple records

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
base_idYesThe Airtable base ID
table_idYesThe table ID or name
recordsYesList of records to create
typecastNoEnable automatic data conversion

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler function for 'create_records' that authenticates, calls AirtableClient, and formats response.
    async def create_records(
        base_id: Annotated[str, Field(description="The Airtable base ID")],
        table_id: Annotated[str, Field(description="The table ID or name")],
        records: Annotated[
            list[dict[str, Any]], Field(description="List of records to create")
        ],
        typecast: Annotated[
            bool, Field(description="Enable automatic data conversion")
        ] = False,
    ) -> list[dict[str, Any]]:
        """Create multiple records in a table."""
        client = await self._get_authenticated_client()
    
        created_records = await client.create_records(
            base_id,
            table_id,
            records,
            typecast,
        )
    
        return [
            {
                "id": record.id,
                "fields": record.fields,
                "createdTime": record.created_time,
            }
            for record in created_records
        ]
  • AirtableClient method implementing the core API call to create records in Airtable.
    async def create_records(
        self,
        base_id: str,
        table_id: str,
        records: list[dict[str, Any]],
        typecast: bool = False,
    ) -> list[AirtableRecord]:
        """Create new records in a table.
    
        Args:
            base_id: The Airtable base ID
            table_id: The table ID or name
            records: List of record data (each should have 'fields' key)
            typecast: Whether to enable automatic data conversion
    
        Returns:
            List of created records
        """
        logger.info(f"Creating {len(records)} records in {base_id}/{table_id}")
    
        request_data = CreateRecordsRequest(
            records=records,
            typecast=typecast,
        )
    
        response = await self._make_request(
            "POST",
            f"/v0/{base_id}/{table_id}",
            data=request_data.model_dump(by_alias=True, exclude_none=True),
            response_model=CreateRecordsResponse,
        )
    
        return response.records
  • Pydantic models defining the request and response structure for create records API interactions.
    class CreateRecordsRequest(BaseModel):
        """Request for creating records."""
    
        records: list[dict[str, dict[str, Any]]]
        typecast: bool | None = False
    
    
    class CreateRecordsResponse(BaseModel):
        """Response from creating records."""
    
        records: list[AirtableRecord]
  • Registration of the 'create_records' tool via FastMCP @tool decorator.
    async def create_records(
        base_id: Annotated[str, Field(description="The Airtable base ID")],
        table_id: Annotated[str, Field(description="The table ID or name")],
        records: Annotated[
            list[dict[str, Any]], Field(description="List of records to create")
        ],
        typecast: Annotated[
            bool, Field(description="Enable automatic data conversion")
        ] = False,
    ) -> list[dict[str, Any]]:
        """Create multiple records in a table."""
        client = await self._get_authenticated_client()
    
        created_records = await client.create_records(
            base_id,
            table_id,
            records,
            typecast,
        )
    
        return [
            {
                "id": record.id,
                "fields": record.fields,
                "createdTime": record.created_time,
            }
            for record in created_records
        ]
  • Pydantic schema defining input arguments for the create_records tool (though not directly used in current implementation).
    class CreateRecordsArgs(BaseArgs):
        """Arguments for create_records tool."""
    
        base_id: str = Field(description="The Airtable base ID")
        table_id: str = Field(description="The table ID or name")
        records: list[dict[str, Any]] = Field(description="List of records to create")
        typecast: bool | None = Field(
            default=False, description="Enable automatic data conversion"
        )
Behavior2/5

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

No annotations are provided, so the description carries the full burden. 'Create multiple records' implies a write operation but doesn't disclose behavioral traits like authentication needs, rate limits, error handling, or what happens on success/failure. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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 extremely concise with just three words, front-loaded with the key action. Every word earns its place, and there's no wasted text, making it efficient for quick understanding.

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

Completeness3/5

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

Given the tool has an output schema (which covers return values), 100% schema description coverage, and no annotations, the description is minimally adequate but lacks depth. For a mutation tool that creates multiple records, it should provide more context on usage, behavior, and differentiation from siblings to be fully complete.

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 100%, so the schema already documents all parameters (base_id, table_id, records, typecast) with descriptions. The description adds no additional meaning beyond what the schema provides, such as format examples or constraints. Baseline 3 is appropriate when the schema does the heavy lifting.

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

Purpose3/5

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

The description 'Create multiple records' clearly states the action (create) and resource (records), but it's vague about the scope and doesn't distinguish from its sibling 'create_record'. It doesn't specify what kind of records or in what system, though context suggests Airtable. It's functional but lacks specificity.

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?

No guidance is provided on when to use this tool versus alternatives like 'create_record' (for single records) or other siblings. The description doesn't mention prerequisites, context, or exclusions, leaving the agent to infer usage from the tool name 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/onimsha/airtable-mcp-server-oauth'

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