Skip to main content
Glama
onimsha

Airtable OAuth MCP Server

by onimsha

delete_records

Remove multiple records from an Airtable base using the Airtable OAuth MCP Server to manage data by specifying base, table, and record IDs.

Instructions

Delete multiple records

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
base_idYesThe Airtable base ID
table_idYesThe table ID or name
record_idsYesList of record IDs to delete

Implementation Reference

  • MCP tool handler function for delete_records. Registers the tool with FastMCP and implements the logic by calling AirtableClient.delete_records after authentication.
    @self.mcp.tool(description="Delete multiple records") async def delete_records( base_id: Annotated[str, Field(description="The Airtable base ID")], table_id: Annotated[str, Field(description="The table ID or name")], record_ids: Annotated[ list[str], Field(description="List of record IDs to delete") ], ) -> list[str]: """Delete multiple records from a table.""" client = await self._get_authenticated_client() deleted_ids = await client.delete_records( base_id, table_id, record_ids, ) return deleted_ids
  • AirtableClient.delete_records method: makes DELETE request to Airtable API with record_ids, parses DeleteRecordsResponse, returns list of deleted IDs.
    async def delete_records( self, base_id: str, table_id: str, record_ids: list[str], ) -> list[str]: """Delete records from a table. Args: base_id: The Airtable base ID table_id: The table ID or name record_ids: List of record IDs to delete Returns: List of deleted record IDs """ logger.info(f"Deleting {len(record_ids)} records from {base_id}/{table_id}") params = {"records[]": record_ids} response = await self._make_request( "DELETE", f"/v0/{base_id}/{table_id}", params=params, response_model=DeleteRecordsResponse, ) return [record["id"] for record in response.records]
  • Pydantic schema/model for delete_records tool input arguments (base_id, table_id, record_ids).
    class DeleteRecordsArgs(BaseArgs): """Arguments for delete_records tool.""" base_id: str = Field(description="The Airtable base ID") table_id: str = Field(description="The table ID or name") record_ids: list[str] = Field(description="List of record IDs to delete")
  • Pydantic model for Airtable delete records API response.
    class DeleteRecordsResponse(BaseModel): """Response from deleting records.""" records: list[dict[str, Any]]

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