knowledgeGraph

Get knowledge graph.

Arguments

  • projectReferenceID!required

    Project whose knowledge is selected. Ordinary callers require project.knowledge.read. A run-bound MCP service credential instead must match the persisted run's project and agent plus its actor or runtime transport binding; its effective sealed authority must grant the invoked tool and a knowledge selector. On project-scoped MCP endpoints, the scoped project supplies this value when omitted.

  • inputKnowledgeGraphInput

  • input.lookupTargetKnowledgeLookupTargetInput

    Source to read; omit for the main preview branch.

  • input.callerSelectorJSON

    Caller-selected document scope. Source membership and server-trusted knowledge policy are intersected with this selector before pagination; denied nodes, edges, broken-link labels and counts are filtered.

  • input.rootFileVersionIdUUID

    Start node by file version ID; or rootPath.

  • input.rootPathString

    Start node by path, 1 to 1024 characters.

  • input.maxDepthInt

    Link hops from the root, 0 to 3; omit the root to read the whole visible set. Responses over 512 KiB fail with a size limit (REST 413, MCP PAYLOAD_TOO_LARGE). Narrow the graph with root_path, max_depth, filters or pagination.limit (GraphQL rootPath, maxDepth, filters or pagination.limit).

  • input.filtersKnowledgeFiltersInput

  • input.paginationKnowledgeGraphPaginationInput

Responses

query KnowledgeGraph($projectReference: ID!) {  knowledgeGraph(projectReference: $projectReference) {    nodes {      fileId      fileVersionId      path      title      type      tags      reserved    }    edges {      sourceFileVersionId      targetFileVersionId      ordinal    }    externalLinks {      sourceFileVersionId      ordinal      url    }    brokenLinks {      sourceFileVersionId      ordinal      targetPath    }    returnedNodes    totalNodes    partial    linksTruncated    limit    pageInfo {      hasNextPage      hasPreviousPage      startCursor      endCursor    }  }}
{  "data": {    "knowledgeGraph": {      "nodes": [        {          "fileId": "string",          "fileVersionId": "string",          "path": "string",          "title": "string",          "type": "string",          "tags": [            "string"          ],          "reserved": false        }      ],      "edges": [        {          "sourceFileVersionId": "string",          "targetFileVersionId": "string",          "ordinal": 0        }      ],      "externalLinks": [        {          "sourceFileVersionId": "string",          "ordinal": 0,          "url": "https://example.com"        }      ],      "brokenLinks": [        {          "sourceFileVersionId": "string",          "ordinal": 0,          "targetPath": "string"        }      ],      "returnedNodes": 0,      "totalNodes": 0,      "partial": false,      "linksTruncated": false,      "limit": 0,      "pageInfo": {        "hasNextPage": false,        "hasPreviousPage": false,        "startCursor": "string",        "endCursor": "string"      }    }  }}

The KnowledgeGraph! in data.knowledgeGraph.