Skip to main content
Glama
LawrenceCirillo

QuickBase MCP Server

quickbase_create_relationship

Establish parent-child relationships between tables by linking them via a foreign key field using this MCP server tool for QuickBase.

Instructions

Create a parent-child relationship between tables

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
childTableIdYesChild table ID
foreignKeyFieldIdYesForeign key field ID in child table
parentTableIdYesParent table ID

Implementation Reference

  • Core implementation of quickbase_create_relationship: sends POST request to QuickBase /relationships endpoint with parent/child table IDs and foreign key field ID.
    async createRelationship(parentTableId: string, childTableId: string, foreignKeyFieldId: number): Promise<void> {
      await this.axios.post('/relationships', {
        parentTableId,
        childTableId,
        foreignKeyFieldId
      });
    }
  • MCP server handler for the tool call: validates args, calls QuickBaseClient.createRelationship, and returns success message.
    case 'quickbase_create_relationship':
      if (!args || typeof args !== 'object') {
        throw new Error('Invalid arguments');
      }
      await this.qbClient.createRelationship(
        args.parentTableId as string,
        args.childTableId as string,
        args.foreignKeyFieldId as number
      );
      return {
        content: [
          {
            type: 'text',
            text: `Relationship created between ${args.parentTableId} and ${args.childTableId}`,
          },
        ],
      };
  • Zod input schema definition for validating tool parameters.
    const CreateRelationshipSchema = z.object({
      parentTableId: z.string().describe('Parent table ID'),
      childTableId: z.string().describe('Child table ID'),
      foreignKeyFieldId: z.number().describe('Foreign key field ID in child table')
    });
  • Tool registration in quickbaseTools array, including name, description, and input schema for MCP discovery.
    {
      name: 'quickbase_create_relationship',
      description: 'Create a parent-child relationship between tables',
      inputSchema: {
        type: 'object',
        properties: {
          parentTableId: { type: 'string', description: 'Parent table ID' },
          childTableId: { type: 'string', description: 'Child table ID' },
          foreignKeyFieldId: { type: 'number', description: 'Foreign key field ID in child table' }
        },
        required: ['parentTableId', 'childTableId', 'foreignKeyFieldId']
      }
    },

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/LawrenceCirillo/QuickBase-MCP-Server'

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