Skip to content

Overview

contox_get_links retrieves the links (relationships) for a specific context identified by its schemaKey. Links form a knowledge graph that expresses relationships between contexts, such as dependencies, cross-references, and hierarchical connections.

Parameters

NameTypeRequiredDefaultDescription
schemaKeystringYesThe schemaKey of the context (e.g., "root/api/auth")
directionenumNo"both"Filter direction: "both", "outgoing", or "incoming"

Return value

Returns links organized by direction:

Outgoing links (from this context to others):

FieldTypeDescription
toSchemaKeystringTarget context schemaKey
linkTypestringRelationship type: see-also, depends-on, child-of, related
reasonstring or nullWhy this link exists
confidencenumber or nullConfidence score (0-1)

Incoming links (from other contexts to this one):

FieldTypeDescription
fromSchemaKeystringSource context schemaKey
linkTypestringRelationship type
reasonstring or nullWhy this link exists
confidencenumber or nullConfidence score (0-1)

Usage examples

Claude calls: contox_get_links({ schemaKey: "root/api/auth" })

Response:
## Outgoing (2)
- -> root/api/users [depends-on] — Auth middleware is required for user endpoints (conf: 0.9)
- -> root/conventions [see-also] — JWT token format conventions

## Incoming (1)
- <- root/frontend/hooks [depends-on] — useAuth hook calls auth API endpoints (conf: 0.85)

Viewing only incoming dependencies

Claude calls: contox_get_links({
  schemaKey: "root/api/auth",
  direction: "incoming"
})

Notes

  • If no links exist for the given schemaKey, the response will indicate "No links found".
  • Links are directional — an outgoing link from A to B does not automatically create an incoming link from B to A (though the reverse may exist independently).
  • Use contox_add_link to create new links between contexts.