Skip to main content
Glama
onimsha

Airtable OAuth MCP Server

by onimsha

get_record

Retrieve a specific Airtable record by providing its base, table, and record IDs to access structured data through authenticated API calls.

Instructions

Get a specific record by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
base_idYesThe Airtable base ID
table_idYesThe table ID or name
record_idYesThe record ID

Implementation Reference

  • MCP tool handler function for 'get_record' that authenticates, calls AirtableClient.get_record, and formats the response.
    @self.mcp.tool(description="Get a specific record by ID")
    async def get_record(
        base_id: Annotated[str, Field(description="The Airtable base ID")],
        table_id: Annotated[str, Field(description="The table ID or name")],
        record_id: Annotated[str, Field(description="The record ID")],
    ) -> dict[str, Any]:
        """Get a specific record by ID."""
        client = await self._get_authenticated_client()
        record = await client.get_record(base_id, table_id, record_id)
    
        return {
            "id": record.id,
            "fields": record.fields,
            "createdTime": record.created_time,
        }
  • Pydantic schema defining input arguments for the get_record tool.
    class GetRecordArgs(BaseArgs):
        """Arguments for get_record tool."""
    
        base_id: str = Field(description="The Airtable base ID")
        table_id: str = Field(description="The table ID or name")
        record_id: str = Field(description="The record ID")
  • AirtableClient helper method that performs the actual HTTP GET request to retrieve a specific record from Airtable API.
    async def get_record(
        self,
        base_id: str,
        table_id: str,
        record_id: str,
    ) -> AirtableRecord:
        """Get a specific record by ID.
    
        Args:
            base_id: The Airtable base ID
            table_id: The table ID or name
            record_id: The record ID
    
        Returns:
            The requested record
        """
        logger.info(f"Getting record {record_id} from {base_id}/{table_id}")
    
        response = await self._make_request(
            "GET",
            f"/v0/{base_id}/{table_id}/{record_id}",
            response_model=AirtableRecord,
        )
    
        return response
  • FastMCP tool registration decorator for the get_record handler.
    @self.mcp.tool(description="Get a specific record by ID")

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