Skip to main content
Glama
cipher416

Airtable MCP Server

by cipher416
getBaseSchema.ts835 B
import { InferSchema, type ToolMetadata } from "xmcp"; import { z } from "zod"; export const schema = { baseId: z.string(), }; export const metadata: ToolMetadata = { name: "getBaseSchema", description: "List the schema of the base owned by the user", annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, }, }; export default async function getBaseSchema(args: InferSchema<typeof schema>) { const result = await fetch( `${process.env.AIRTABLE_API_URL}/v0/meta/bases/${args.baseId}/tables`, { headers: { Authorization: `Bearer ${process.env.AIRTABLE_API_KEY}`, }, }, ); if (!result.ok) { throw new Error(`Failed to fetch base schema: ${result.status}`); } const baseSchema = await result.json(); return JSON.stringify(baseSchema); }

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/cipher416/airtable-mcp'

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