AgentDBDocs

Relationships

Link and unlink records; list a record's links.

Start with: relationships_link, relationships_link_batch, relationships_list, relationships_unlink.

4 operations. Discover them from an agent with agentdb_capabilities {"category": "relationships"}.

#relationships_list

stable added in 0.2.0-alpha.4 or earlier read-only

List records linked to a record. direction 'outgoing' follows a relationship defined on this record's object; 'incoming' finds records that link to it. Page with after=next_after.

MCP tool
relationships_list
REST
GET /v1/workspaces/{ws}/records/{record}/related scope records:read

Arguments

ArgumentTypeRequiredDescription
relationshipstringyesRelationship type name.
direction"outgoing" | "incoming"string, one of: outgoing, incoming, default "outgoing"
limitintegerinteger, 1–200, default 50
afterstringstring
include_archivedbooleanboolean
record_idstringyesRecord id (rec_...)
workspacestringWorkspace id (preferred), slug or exact name. Omit for the default workspace. Resolve names once with workspace_select.

Example

MCP
{
  "tool": "relationships_list",
  "arguments": {
    "record_id": "rec_example",
    "relationship": "works_at",
    "direction": "outgoing"
  }
}
MCP via agentdb_execute
{
  "tool": "agentdb_execute",
  "arguments": {
    "operation": "relationships_list",
    "arguments": {
      "record_id": "rec_example",
      "relationship": "works_at",
      "direction": "outgoing"
    }
  }
}
REST
curl -s "https://app.agentdb.link/v1/workspaces/$AGENTDB_WORKSPACE/records/rec_example/related" \
  -H "Authorization: Bearer $AGENTDB_TOKEN"