quickbase_create_lookup_field
Create a lookup field in QuickBase to pull data from a related table by specifying parent and child table IDs, field references, and a label for the new field.
Instructions
Create a lookup field to pull data from a related table
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| childTableId | Yes | Child table ID where lookup field will be created | |
| lookupFieldLabel | Yes | Label for the new lookup field | |
| parentFieldId | Yes | Field ID in parent table to lookup | |
| parentTableId | Yes | Parent table ID to lookup from | |
| referenceFieldId | Yes | Reference field ID in child table |
Implementation Reference
- src/quickbase/client.ts:303-323 (handler)Core handler function that executes the QuickBase API call to create a lookup field using the specified reference and lookup parameters.async createLookupField( childTableId: string, parentTableId: string, referenceFieldId: number, parentFieldId: number, lookupFieldLabel: string ): Promise<number> { const response = await this.axios.post('/fields', { tableId: childTableId, label: lookupFieldLabel, fieldType: 'lookup', properties: { lookupReference: { tableId: parentTableId, fieldId: parentFieldId, referenceFieldId: referenceFieldId } } }); return response.data.id; }
- src/tools/index.ts:88-94 (schema)Zod schema defining the input validation for the tool's parameters.const CreateLookupFieldSchema = z.object({ childTableId: z.string().describe('Child table ID where lookup field will be created'), parentTableId: z.string().describe('Parent table ID to lookup from'), referenceFieldId: z.number().describe('Reference field ID in child table'), parentFieldId: z.number().describe('Field ID in parent table to lookup'), lookupFieldLabel: z.string().describe('Label for the new lookup field') });
- src/tools/index.ts:452-465 (registration)MCP tool registration object defining the tool's metadata and input schema for use in the server.name: 'quickbase_create_lookup_field', description: 'Create a lookup field to pull data from a related table', inputSchema: { type: 'object', properties: { childTableId: { type: 'string', description: 'Child table ID where lookup field will be created' }, parentTableId: { type: 'string', description: 'Parent table ID to lookup from' }, referenceFieldId: { type: 'number', description: 'Reference field ID in child table' }, parentFieldId: { type: 'number', description: 'Field ID in parent table to lookup' }, lookupFieldLabel: { type: 'string', description: 'Label for the new lookup field' } }, required: ['childTableId', 'parentTableId', 'referenceFieldId', 'parentFieldId', 'lookupFieldLabel'] } },