Skip to main content
Glama
onimsha

Airtable OAuth MCP Server

by onimsha

describe_table

Retrieve detailed metadata about an Airtable table, including its structure and fields, to understand its data organization and schema.

Instructions

Get detailed information about a specific table

Input Schema

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

Implementation Reference

  • Handler function that implements the describe_table tool logic: authenticates client, fetches base schema, locates the table, and returns its details including fields and views. Also serves as registration via @self.mcp.tool decorator.
    @self.mcp.tool(description="Get detailed information about a specific table")
    async def describe_table(
        base_id: Annotated[str, Field(description="The Airtable base ID")],
        table_id: Annotated[str, Field(description="The table ID or name")],
    ) -> dict[str, Any]:
        """Get detailed information about a specific table including all fields."""
        client = await self._get_authenticated_client()
        schema = await client.get_base_schema(base_id)
    
        # Find the specific table
        table = next(
            (t for t in schema.tables if t.id == table_id or t.name == table_id),
            None,
        )
    
        if not table:
            raise AirtableAPIError(
                f"Table '{table_id}' not found in base '{base_id}'"
            )
    
        return {
            "id": table.id,
            "name": table.name,
            "description": table.description,
            "primaryFieldId": table.primary_field_id,
            "fields": [
                {
                    "id": field.id,
                    "name": field.name,
                    "type": field.type,
                    "description": field.description,
                    "options": field.options,
                }
                for field in table.fields
            ],
            "views": table.views,
        }
  • Pydantic schema defining input arguments for describe_table tool (base_id and table_id), though used primarily in tests.
    class DescribeTableArgs(BaseArgs):
        """Arguments for describe_table tool."""
    
        base_id: str = Field(description="The Airtable base ID")
        table_id: str = Field(description="The table ID or name")

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