Skip to main content
Glama
felores

Airtable MCP Server

by felores

list_records

Retrieve records from an Airtable table by specifying the base ID and table name, with optional limit on results.

Instructions

List records in a table

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
base_idYesID of the base
table_nameYesName of the table
max_recordsNoMaximum number of records to return

Implementation Reference

  • The handler implementation for the 'list_records' tool. It destructures the input arguments, performs a GET request to the Airtable API to list records from the specified table (with optional maxRecords parameter), and returns the records as formatted JSON text content.
    case "list_records": {
      const { base_id, table_name, max_records } = request.params.arguments as {
        base_id: string;
        table_name: string;
        max_records?: number;
      };
      const response = await this.axiosInstance.get(`/${base_id}/${table_name}`, {
        params: max_records ? { maxRecords: max_records } : undefined,
      });
      return {
        content: [{
          type: "text",
          text: JSON.stringify(response.data.records, null, 2),
        }],
      };
    }
  • The input schema for the 'list_records' tool, defining the expected parameters: required base_id and table_name (strings), optional max_records (number). Used for validation in tool calls.
    inputSchema: {
      type: "object",
      properties: {
        base_id: {
          type: "string",
          description: "ID of the base",
        },
        table_name: {
          type: "string",
          description: "Name of the table",
        },
        max_records: {
          type: "number",
          description: "Maximum number of records to return",
        },
      },
      required: ["base_id", "table_name"],
    },
  • src/index.ts:253-274 (registration)
    The registration of the 'list_records' tool in the list of available tools returned by ListToolsRequestSchema. Includes name, description, and input schema.
    {
      name: "list_records",
      description: "List records in a table",
      inputSchema: {
        type: "object",
        properties: {
          base_id: {
            type: "string",
            description: "ID of the base",
          },
          table_name: {
            type: "string",
            description: "Name of the table",
          },
          max_records: {
            type: "number",
            description: "Maximum number of records to return",
          },
        },
        required: ["base_id", "table_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/felores/airtable-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server