Skip to main content
Glama
onimsha

Airtable OAuth MCP Server

by onimsha

list_tables

Retrieve tables from an Airtable base to view structure and field information for data management.

Instructions

List tables in a specific base

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
base_idYesThe Airtable base ID
detail_levelNoLevel of detail to include in responsetableIdentifiersOnly

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the 'list_tables' MCP tool. Authenticates via _get_authenticated_client, fetches the base schema using AirtableClient.get_base_schema(base_id), and returns either basic table identifiers or detailed info including fields based on the detail_level parameter.
    @self.mcp.tool(description="List tables in a specific base")
    async def list_tables(
        base_id: Annotated[str, Field(description="The Airtable base ID")],
        detail_level: Annotated[
            Literal["tableIdentifiersOnly", "withFieldInfo"],
            Field(
                description="Level of detail to include in response",
                default="tableIdentifiersOnly",
            ),
        ] = "tableIdentifiersOnly",
    ) -> list[dict[str, Any]]:
        """List tables in a specific base with optional field information."""
        client = await self._get_authenticated_client()
        schema = await client.get_base_schema(base_id)
    
        if detail_level == "tableIdentifiersOnly":
            return [
                {
                    "id": table.id,
                    "name": table.name,
                }
                for table in schema.tables
            ]
        else:  # withFieldInfo
            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
                    ],
                }
                for table in schema.tables
            ]
  • Pydantic schema definition for the input arguments of the list_tables tool, matching the inline annotations used in the handler.
    class ListTablesArgs(BaseArgs):
        """Arguments for list_tables tool."""
    
        base_id: str = Field(description="The Airtable base ID")
        detail_level: Literal["tableIdentifiersOnly", "withFieldInfo"] = Field(
            default="tableIdentifiersOnly",
            description="Level of detail to include in response",
        )
  • The _register_tools() method is called during server initialization to register all MCP tools, including list_tables via its @self.mcp.tool decorator.
    # Register all MCP tools
    self._register_tools()
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('List tables') but lacks critical details: whether this is a read-only operation (implied but not explicit), if it requires authentication, pagination behavior, rate limits, error handling, or what the output contains (though an output schema exists). For a tool with no annotation coverage, this is a significant gap in transparency.

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

Conciseness5/5

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

The description is a single, efficient sentence ('List tables in a specific base') that is front-loaded with the core action and resource. It wastes no words, avoids redundancy, and is appropriately sized for a simple listing tool. Every part of the sentence earns its place by specifying scope ('in a specific base').

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

Completeness3/5

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

Given the tool's low complexity (listing operation), high schema coverage (100%), and presence of an output schema (which handles return values), the description is minimally complete. However, it lacks context on authentication, error cases, or sibling differentiation, which could aid the agent. It's adequate but leaves gaps that the agent must bridge with external knowledge or trial.

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?

Schema description coverage is 100%, with both parameters well-documented in the schema (base_id as 'Airtable base ID', detail_level with enum values and default). The description adds no additional parameter semantics beyond implying a 'specific base' context for base_id. Since the schema does the heavy lifting, the baseline score of 3 is appropriate, though the description doesn't compensate or enhance understanding.

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 clearly states the verb ('List') and resource ('tables in a specific base'), making the purpose immediately understandable. It distinguishes from siblings like 'list_bases' (which lists bases) and 'describe_table' (which provides detailed table metadata). However, it doesn't explicitly mention the Airtable context or differentiate from 'list_records' (which lists records within tables), leaving room for slight ambiguity.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a base ID), contrast with 'list_bases' (for listing bases) or 'describe_table' (for detailed table info), or specify use cases like exploring base structure. The agent must infer usage from the name and parameters alone.

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

Install Server

Other 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