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"
        )

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.4/5.0
Behavior1/5

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

The description gives no behavioral details beyond the update action. With no annotations, the tool's effects (e.g., partial vs full replacement, error handling, idempotency) are completely opaque. The output schema exists but isn't referenced.

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

Conciseness2/5

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

At three words, the description is severely under-specified. While concise, it sacrifices clarity and fails to front-load critical information (e.g., 'update multiple records in an Airtable table').

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

Completeness1/5

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

Given the complexity of a batch update operation and the existence of an output schema, the description is woefully incomplete. It omits return value structure, error behavior, limits, and caveats, leaving an agent with insufficient information to use the tool correctly.

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?

The input schema has 100% description coverage for all four parameters. The tool description adds no additional meaning beyond the schema, so the baseline score of 3 applies.

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 'Update multiple records' clearly states the verb (update) and resource (records), distinguishing it from create, delete, or single-record tools. However, it does not explicitly mention the Airtable context or differentiate from similar batch operations beyond the name and sibling list.

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 guidelines are provided on when to use this tool versus alternatives (e.g., create_records, delete_records). There is no mention of prerequisites, limits, or situations where this tool is inappropriate.

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