Skip to main content

Relationship Tools

Tools for managing typed relationships between pages in the research knowledge graph. Relationships are stored as directed edges in Memgraph and power the evidence chain, contradiction detection, and intelligence queries.

Available Tools

relationship_create

Create a typed relationship between two pages.

{
"name": "relationship_create",
"arguments": {
"workspaceId": "ws_123",
"fromPageId": "page_hyp_123",
"toPageId": "page_hyp_456",
"type": "EXTENDS",
"metadata": {
"confidence": 0.85,
"notes": "Builds on the caching hypothesis for read-heavy workloads"
}
}
}

Arguments:

ArgumentTypeRequiredDescription
workspaceIdstringYesWorkspace ID
fromPageIdstringYesSource page ID
toPageIdstringYesTarget page ID
typestringYesRelationship type
metadataobjectNoOptional relationship metadata

Response:

{
"edge": {
"from": "page_hyp_123",
"to": "page_hyp_456",
"type": "EXTENDS",
"metadata": { "confidence": 0.85 }
}
}

relationship_remove

Remove a relationship between two pages.

{
"name": "relationship_remove",
"arguments": {
"workspaceId": "ws_123",
"fromPageId": "page_hyp_123",
"toPageId": "page_hyp_456",
"type": "EXTENDS"
}
}

Arguments:

ArgumentTypeRequiredDescription
workspaceIdstringYesWorkspace ID
fromPageIdstringYesSource page ID
toPageIdstringYesTarget page ID
typestringYesRelationship type to remove

relationship_list

List relationships for a page.

{
"name": "relationship_list",
"arguments": {
"workspaceId": "ws_123",
"pageId": "page_hyp_123",
"direction": "both",
"types": ["VALIDATES", "CONTRADICTS"]
}
}

Arguments:

ArgumentTypeRequiredDescription
workspaceIdstringYesWorkspace ID
pageIdstringYesPage ID to get relationships for
directionstringNooutgoing, incoming, or both (default: both)
typesstring[]NoFilter by relationship types

Response:

{
"edges": [
{
"from": "page_exp_456",
"to": "page_hyp_123",
"type": "VALIDATES",
"metadata": {}
},
{
"from": "page_hyp_123",
"to": "page_hyp_789",
"type": "EXTENDS",
"metadata": { "confidence": 0.85 }
}
]
}

Relationship Types

TypeDescriptionExample
VALIDATESEvidence supports a hypothesisExperiment → Hypothesis
CONTRADICTSEvidence contradicts a hypothesisExperiment → Hypothesis
TESTS_HYPOTHESISAn experiment tests a hypothesisExperiment → Hypothesis
EXTENDSOne finding builds on anotherHypothesis → Hypothesis
INSPIRED_BYWork was inspired by another pageAny → Any
USES_DATA_FROMUses data from another experimentExperiment → Experiment
FORMALIZESFormalizes an informal observationFinding → Observation
SPAWNED_FROMCreated as a follow-upAny → Any
SUPERSEDESReplaces an older pageHypothesis → Hypothesis
CITESReferences another workAny → Any
REPLICATESSuccessfully replicates resultsExperiment → Experiment
REPRODUCESReproduces resultsExperiment → Experiment
FAILS_TO_REPRODUCEFailed reproduction attemptExperiment → Experiment
USES_ASSUMPTIONDepends on an assumptionAny → Any

Knowledge Graph

Relationships form a directed knowledge graph stored in Memgraph:

The graph is used by:

  • Evidence chainshypothesis_get traverses the graph to find all supporting/contradicting evidence
  • Contradiction detection — Pattern detection scans for CONTRADICTS edges
  • Convergence detection — Counts VALIDATES edges to find well-supported hypotheses
  • Intelligence queries — Context assembly traverses relationships to build comprehensive context bundles