Skip to main content
Glama
onimsha

Airtable OAuth MCP Server

by onimsha

update_records

Modify multiple entries in an Airtable base through the MCP server, enabling batch updates with automatic data conversion.

Instructions

Update multiple records

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
base_idYesThe Airtable base ID
table_idYesThe table ID or name
recordsYesList of record updates
typecastNoEnable automatic data conversion

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler function for update_records. Decorated with @self.mcp.tool() which registers it as an MCP tool. Delegates to AirtableClient.update_records() and formats the response.
    @self.mcp.tool(description="Update multiple records")
    async def update_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 record updates")
        ],
        typecast: Annotated[
            bool, Field(description="Enable automatic data conversion")
        ] = False,
    ) -> list[dict[str, Any]]:
        """Update multiple records in a table."""
        client = await self._get_authenticated_client()
    
        updated_records = await client.update_records(
            base_id,
            table_id,
            records,
            typecast,
        )
    
        return [
            {
                "id": record.id,
                "fields": record.fields,
                "createdTime": record.created_time,
            }
            for record in updated_records
        ]
  • AirtableClient helper method that makes the actual PATCH request to Airtable API /v0/{base}/{table} endpoint to update records. Uses UpdateRecordsRequest model and handles authentication, rate limiting, and errors.
    async def update_records(
        self,
        base_id: str,
        table_id: str,
        records: list[dict[str, Any]],
        typecast: bool = False,
    ) -> list[AirtableRecord]:
        """Update existing records in a table.
    
        Args:
            base_id: The Airtable base ID
            table_id: The table ID or name
            records: List of record updates (each should have 'id' and 'fields' keys)
            typecast: Whether to enable automatic data conversion
    
        Returns:
            List of updated records
        """
        logger.info(f"Updating {len(records)} records in {base_id}/{table_id}")
    
        request_data = UpdateRecordsRequest(
            records=records,
            typecast=typecast,
        )
    
        response = await self._make_request(
            "PATCH",
            f"/v0/{base_id}/{table_id}",
            data=request_data.model_dump(by_alias=True, exclude_none=True),
            response_model=UpdateRecordsResponse,
        )
    
        return response.records
  • Pydantic models defining the request and response structure for the update_records API operation.
    class UpdateRecordsRequest(BaseModel):
        """Request for updating records."""
    
        records: list[dict[str, Any]]
        typecast: bool | None = False
    
    
    class UpdateRecordsResponse(BaseModel):
        """Response from updating records."""
    
        records: list[AirtableRecord]
  • Pydantic schema defining arguments for the MCP update_records tool (though not directly used in server.py).
    class UpdateRecordsArgs(BaseArgs):
        """Arguments for update_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 record updates")
        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 full burden. 'Update multiple records' implies a batch mutation operation, but it doesn't disclose permissions needed, whether updates are atomic, error handling, rate limits, or what happens on partial failures. This is inadequate for a mutation tool with zero annotation coverage.

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 core action. There's no wasted language, though this conciseness comes at the cost of completeness.

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?

Given this is a mutation tool with no annotations, 4 parameters, and an output schema exists, the description is incomplete. It doesn't explain the update mechanism, constraints, or what the output might contain. The existence of an output schema helps but doesn't compensate for the lack of behavioral context in the description.

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. The description adds no additional meaning beyond implying batch updates through 'multiple records', which is redundant with the 'records' array parameter in the schema. Baseline 3 is appropriate when 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 'Update multiple records' clearly states the verb (update) and resource (records), but it's vague about scope and doesn't distinguish from siblings like 'create_record' or 'delete_records'. It doesn't specify what kind of records or system is involved.

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 on when to use this tool versus alternatives is provided. The description doesn't mention prerequisites, when to choose this over single-record updates, or how it relates to siblings like 'create_records' or 'delete_records'.

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