Skip to main content
Glama
onimsha

Airtable OAuth MCP Server

by onimsha

describe_table

Retrieve detailed metadata for an Airtable table, including structure and fields, using a secure OAuth 2.0 authenticated interface.

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

  • The handler function for the 'describe_table' tool, registered with @self.mcp.tool decorator. It fetches the base schema using an authenticated Airtable client, locates the specified table, and returns detailed information including fields and views.
    @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 model defining the input arguments (base_id and table_id) for the describe_table tool, matching the handler's Annotated parameters.
    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")
  • The @self.mcp.tool decorator registers the describe_table function as an MCP tool named 'describe_table'.
    @self.mcp.tool(description="Get detailed information about a specific table")

Other Tools

Related 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