create_record
Add new records to Airtable tables by specifying base ID, table name, and field values to store structured data programmatically.
Instructions
Create a new record in a table
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base_id | Yes | ID of the base | |
| table_name | Yes | Name of the table | |
| fields | Yes | Record fields as key-value pairs |
Implementation Reference
- src/index.ts:527-542 (handler)Handler for the create_record tool: extracts arguments, posts to Airtable API to create a record, and returns the response.case "create_record": { const { base_id, table_name, fields } = request.params.arguments as { base_id: string; table_name: string; fields: Record<string, any>; }; const response = await this.axiosInstance.post(`/${base_id}/${table_name}`, { fields, }); return { content: [{ type: "text", text: JSON.stringify(response.data, null, 2), }], }; }
- src/index.ts:275-296 (registration)Registration of the create_record tool in the listTools response, including name, description, and input schema.{ name: "create_record", description: "Create a new record 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", }, fields: { type: "object", description: "Record fields as key-value pairs", }, }, required: ["base_id", "table_name", "fields"], }, },
- src/index.ts:278-295 (schema)Input schema definition for the create_record tool, specifying parameters: base_id, table_name, and fields.inputSchema: { type: "object", properties: { base_id: { type: "string", description: "ID of the base", }, table_name: { type: "string", description: "Name of the table", }, fields: { type: "object", description: "Record fields as key-value pairs", }, }, required: ["base_id", "table_name", "fields"], },