# Get the knowledge graph

Tool: `veryfront__get_knowledge_graph`

Get knowledge graph.

## Arguments

| Name                   | Type                                                                                                             | Required | Description                                                                                                                                                                                                                                                                                                                                                                                               |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `lookup_target`        | object                                                                                                           |          | Optional. Omit to search the main preview branch (the default). Set this to target another preview branch, a deployed environment, or a published release; unresolved targets are returned as not found.                                                                                                                                                                                                  |
| `caller_selector`      | boolean \| string · min length 1 · max length 4096 \| array of string · min length 1 · max length 4096 \| object |          | 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.                                                                                                                                                                                              |
| `root_file_version_id` | string · uuid                                                                                                    |          | Provide the root file version id.                                                                                                                                                                                                                                                                                                                                                                         |
| `root_path`            | string · min length 1 · max length 1024                                                                          |          | Provide the root path.                                                                                                                                                                                                                                                                                                                                                                                    |
| `max_depth`            | integer · min 0 · max 3                                                                                          |          | 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).                                                                                                     |
| `filters`              | object                                                                                                           |          | Provide the filters.                                                                                                                                                                                                                                                                                                                                                                                      |
| `pagination`           | object                                                                                                           |          | Provide the pagination.                                                                                                                                                                                                                                                                                                                                                                                   |
| `project_reference`    | string · min length 1                                                                                            |          | 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. |

## Responses

| Status | Description                                           |
| ------ | ----------------------------------------------------- |
| 200    | The tool ran; its output is result.structuredContent. |

## Call it

```bash
curl -X POST -N "https://api.veryfront.com/mcp" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Accept: application/json, text/event-stream" \
  -H "Content-Type: application/json" \
  -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "veryfront__get_knowledge_graph",
    "arguments": {}
  }
}'
```

## Example response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"nodes\":[{\"file_id\":\"00000000-0000-0000-0000-000000000000\",\"file_version_id\":\"00000000-0000-0000-0000-000000000000\",\"path\":\"string\",\"title\":\"string\",\"type\":\"string\",\"tags\":[\"string\"],\"reserved\":false}],\"edges\":[{\"source_file_version_id\":\"00000000-0000-0000-0000-000000000000\",\"target_file_version_id\":\"00000000-0000-0000-0000-000000000000\",\"ordinal\":0}],\"external_links\":[{\"source_file_version_id\":\"00000000-0000-0000-0000-000000000000\",\"ordinal\":0,\"url\":\"string\"}],\"broken_links\":[{\"source_file_version_id\":\"00000000-0000-0000-0000-000000000000\",\"ordinal\":0,\"target_path\":\"string\"}],\"returned_nodes\":0,\"total_nodes\":0,\"partial\":false,\"links_truncated\":false,\"limit\":1,\"page_info\":{\"self\":\"string\",\"first\":{},\"next\":\"string\",\"prev\":{}}}"
      }
    ],
    "structuredContent": {
      "nodes": [
        {
          "file_id": "00000000-0000-0000-0000-000000000000",
          "file_version_id": "00000000-0000-0000-0000-000000000000",
          "path": "string",
          "title": "string",
          "type": "string",
          "tags": [
            "string"
          ],
          "reserved": false
        }
      ],
      "edges": [
        {
          "source_file_version_id": "00000000-0000-0000-0000-000000000000",
          "target_file_version_id": "00000000-0000-0000-0000-000000000000",
          "ordinal": 0
        }
      ],
      "external_links": [
        {
          "source_file_version_id": "00000000-0000-0000-0000-000000000000",
          "ordinal": 0,
          "url": "string"
        }
      ],
      "broken_links": [
        {
          "source_file_version_id": "00000000-0000-0000-0000-000000000000",
          "ordinal": 0,
          "target_path": "string"
        }
      ],
      "returned_nodes": 0,
      "total_nodes": 0,
      "partial": false,
      "links_truncated": false,
      "limit": 1,
      "page_info": {
        "self": "string",
        "first": {},
        "next": "string",
        "prev": {}
      }
    }
  }
}
```
