Skip to main content
Glama

search_records

Find records in an Airtable table by searching a specific field for matching values to retrieve relevant data entries.

Instructions

Search for records in a table

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
base_idYesID of the base
table_nameYesName of the table
field_nameYesName of the field to search in
valueYesValue to search for

Implementation Reference

  • Handler function for the 'search_records' tool. Extracts parameters, makes an Airtable API GET request with a filterByFormula to match the specified field value, and returns the matching records as JSON.
    case "search_records": { const { base_id, table_name, field_name, value } = request.params.arguments as { base_id: string; table_name: string; field_name: string; value: string; }; const response = await this.axiosInstance.get(`/${base_id}/${table_name}`, { params: { filterByFormula: `{${field_name}} = "${value}"`, }, }); return { content: [{ type: "text", text: JSON.stringify(response.data.records, null, 2), }], }; }
  • src/index.ts:346-370 (registration)
    Registration of the 'search_records' tool in the ListTools response, including its name, description, and input schema definition.
    name: "search_records", description: "Search for 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", }, field_name: { type: "string", description: "Name of the field to search in", }, value: { type: "string", description: "Value to search for", }, }, required: ["base_id", "table_name", "field_name", "value"], }, },
  • Input schema definition for the 'search_records' tool, specifying required parameters: base_id, table_name, field_name, value.
    inputSchema: { type: "object", properties: { base_id: { type: "string", description: "ID of the base", }, table_name: { type: "string", description: "Name of the table", }, field_name: { type: "string", description: "Name of the field to search in", }, value: { type: "string", description: "Value to search for", }, }, required: ["base_id", "table_name", "field_name", "value"], }, },

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