Serenities AI™
Back to MCP Overview

Linked Records Tools

Tools for creating links between records in different tables.

6 tools

Available Tools

linkedRecords_createLinkField

Create a link field to connect two tables. Params: tableId (source table), name (field name), linkedTableId (target table), linkType ("one_to_one", "one_to_many", "many_to_many"), linkDisplayMode ("COUNT", "LABELS", "CHIPS"), allowMultipleLinks (boolean), createReciprocal (default true, creates reverse link in target table).

Input Schema

tableIdstringrequired

Source table ID from listTables

namestringrequired

Name for the link field

descriptionstring

Optional description

linkedTableIdstringrequired

Target table ID to link to

linkTypestringrequired

Relationship type: "one_to_one", "one_to_many", or "many_to_many"

linkDisplayModestring

Display mode: "COUNT", "LABELS", or "CHIPS"

allowMultipleLinksboolean

Allow linking to multiple records

linkOnDeletestring

What happens to linking rows when a linked record is deleted: RESTRICT blocks the delete while links exist; CASCADE deletes the linking rows too (chains, capped at 500 rows per delete); SET_NULL (default) / NO_ACTION just remove the connection

linkOnUpdatestring

Action on update

createReciprocalboolean

Create reciprocal field in target table

Example Call

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "linkedRecords_createLinkField",
    "arguments": {
          "tableId": "example",
          "name": "example",
          "description": "example"
    }
  }
}
linkedRecords_linkRecords

Link records together. Params: tableId (source), recordId (source row ID), fieldId (link field ID), linkedRecordIds (array of target row IDs), preserveOrder.

Input Schema

tableIdstringrequired

Source table ID

recordIdstringrequired

Source row ID to link from

fieldIdstringrequired

Link field ID

linkedRecordIdsarrayrequired

Array of target row IDs to link to

preserveOrderboolean

Preserve order of linked records

Example Call

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "linkedRecords_linkRecords",
    "arguments": {
          "tableId": "example",
          "recordId": "example",
          "fieldId": "example"
    }
  }
}
linkedRecords_unlinkRecords

Remove links. Params: tableId, recordId, fieldId, linkedRecordIds (array of IDs to unlink). Act only on what the person named or picked.

Input Schema

tableIdstringrequired

Source table ID

recordIdstringrequired

Source row ID

fieldIdstringrequired

Link field ID

linkedRecordIdsarrayrequired

Array of target row IDs to unlink

Example Call

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "linkedRecords_unlinkRecords",
    "arguments": {
          "tableId": "example",
          "recordId": "example",
          "fieldId": "example"
    }
  }
}
linkedRecords_getLinkedRecords

Get linked records for a row. Params: tableId, recordId, fieldId, limit (default 50), offset, sortBy (field to sort by), sortDirection ("asc"|"desc"). Always returns the summarized shape { id, primaryFieldValue, metadata } per linked record — the "expand" flag is currently accepted but ignored (no full-record payload), so fetch the target rows directly if you need all fields.

Input Schema

tableIdstringrequired

Source table ID

recordIdstringrequired

Source row ID

fieldIdstringrequired

Link field ID

expandboolean

Include full record data

limitnumber

Max records to return (default: 50)

offsetnumber

Skip records for pagination

sortBystring

Field to sort by

sortDirectionstring

Sort direction

Example Call

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "linkedRecords_getLinkedRecords",
    "arguments": {
          "tableId": "example",
          "recordId": "example",
          "fieldId": "example"
    }
  }
}
linkedRecords_bulkLinkRecords

Bulk link operations. Params: tableId, fieldId, operations (array of {sourceRecordId, targetRecordIds, operation: "link"|"unlink"|"replace"}).

Input Schema

tableIdstringrequired

Source table ID

fieldIdstringrequired

Link field ID

operationsarrayrequired

Array of link operations to perform

Example Call

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "linkedRecords_bulkLinkRecords",
    "arguments": {
          "tableId": "example",
          "fieldId": "example",
          "operations": {}
    }
  }
}
linkedRecords_reorderLinkedRecords

Change link order. Params: tableId, recordId, fieldId, orderedRecordIds (array in desired order).

Input Schema

tableIdstringrequired

Source table ID

recordIdstringrequired

Source row ID

fieldIdstringrequired

Link field ID

orderedRecordIdsarrayrequired

Target row IDs in desired order

Example Call

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "linkedRecords_reorderLinkedRecords",
    "arguments": {
          "tableId": "example",
          "recordId": "example",
          "fieldId": "example"
    }
  }
}