> ## Documentation Index
> Fetch the complete documentation index at: https://veryfront.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get the knowledge graph

> Get knowledge graph.

`veryfront__get_knowledge_graph`

## Access

No external-service connection is required. Use a Veryfront credential with access to the requested resources.

**Call type:** Read-only.

## Arguments

| Field | Type | Required | Description and constraints |
| - | - | - | - |
| `lookup_target` | `object or object or object` | No | 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 or string or string[] or object` | No | 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` | No | Provide the root file version id. Format: `uuid`. |
| `root_path` | `string` | No | Provide the root path. Minimum length: `1`. Maximum length: `1024`. |
| `max_depth` | `integer` | No | 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). Minimum: `0`. Maximum: `3`. |
| `filters` | `object` | No | Provide the filters. |
| `pagination` | `object` | No | Provide the pagination. |
| `project_reference` | `string` | No | 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. Minimum length: `1`. |

## Example request

Send this JSON-RPC request through an initialized MCP client. Replace sample identifiers and values before calling the tool. See [MCP client setup](https://veryfront.com/docs/cloud/getting-started/connect-mcp.md).

```json title="request.json" theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "veryfront__get_knowledge_graph",
    "arguments": {}
  }
}
```

## Result

The published output shape is summarized below. Inspect both the MCP response content and `isError` when handling a call.

| Field | Type | Required | Description and constraints |
| - | - | - | - |
| `nodes` | `object[]` | Yes | Visible knowledge files as nodes. Markdown document links are edges; external and broken links are returned separately. Use the graph to find related files. |
| `edges` | `object[]` | Yes | List of edges associated with this tool result. |
| `external_links` | `object[]` | Yes | List of external links associated with this tool result. |
| `broken_links` | `object[]` | Yes | List of broken links associated with this tool result. |
| `returned_nodes` | `integer` | Yes | Minimum: `0`. |
| `total_nodes` | `integer` | Yes | Minimum: `0`. |
| `partial` | `boolean` | Yes | |
| `links_truncated` | `boolean` | Yes | True when the combined link count or byte budget omits links. The graph is partial. |
| `limit` | `integer` | Yes | Maximum number of results included in this payload. Minimum: `1`. Maximum: `200`. |
| `page_info` | `object` | Yes | Pagination cursor values for traversing the result set. |

## Full schemas

```json title="input-schema.json" theme={null}
{
  "type": "object",
  "properties": {
    "lookup_target": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "preview_branch",
              "description": "Provide the kind."
            },
            "branch_id": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid",
                  "description": "Branch identifier. Use null for the main branch when the tool supports it."
                },
                {
                  "type": "null",
                  "description": "Branch identifier. Use null for the main branch when the tool supports it."
                }
              ],
              "description": "Branch to search. Omit or use null for the main branch (the default)."
            }
          },
          "required": [
            "kind"
          ],
          "additionalProperties": false,
          "description": "Search a working branch, the default scope when lookup_target is omitted."
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "environment",
              "description": "Provide the kind."
            },
            "environment_id": {
              "type": "string",
              "format": "uuid",
              "description": "ID of the environment whose deployed release to search."
            },
            "environment_name": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "description": "Name of the environment (for example \"production\") whose deployed release to search."
            }
          },
          "required": [
            "kind"
          ],
          "additionalProperties": false,
          "description": "Search the release currently deployed to an environment. Provide environment_id or environment_name."
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "release",
              "description": "Provide the kind."
            },
            "release_id": {
              "type": "string",
              "format": "uuid",
              "description": "ID of the release to search."
            },
            "release_version": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "description": "Version string of the release to search."
            }
          },
          "required": [
            "kind"
          ],
          "additionalProperties": false,
          "description": "Search a specific published release. Provide release_id or release_version."
        }
      ],
      "description": "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": {
      "anyOf": [
        {
          "type": "boolean",
          "description": "Provide the option 1."
        },
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 4096,
          "description": "Provide the option 2."
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/properties/caller_selector/anyOf/1",
            "description": "One caller selector item supplied to the tool."
          },
          "maxItems": 1024,
          "description": "Provide one or more option 3 values."
        },
        {
          "type": "object",
          "additionalProperties": {
            "type": "boolean",
            "description": "Additional structured values supplied to the tool."
          },
          "description": "Provide the option 4."
        }
      ],
      "description": "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": {
      "type": "string",
      "format": "uuid",
      "description": "Provide the root file version id."
    },
    "root_path": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1024,
      "description": "Provide the root path."
    },
    "max_depth": {
      "type": "integer",
      "minimum": 0,
      "maximum": 3,
      "description": "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": {
      "type": "object",
      "properties": {
        "search": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256,
          "description": "Case-insensitive title or path search within the authorized source."
        },
        "type": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "description": "Provide the type."
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "One tag item supplied to the tool."
          },
          "maxItems": 64,
          "description": "Provide the tags."
        }
      },
      "additionalProperties": false,
      "description": "Provide the filters."
    },
    "pagination": {
      "type": "object",
      "properties": {
        "limit": {
          "type": "integer",
          "minimum": 1,
          "maximum": 200,
          "description": "Maximum number of results to return."
        },
        "cursor": {
          "type": "string",
          "minLength": 1,
          "maxLength": 2048,
          "description": "Opaque pagination cursor returned by a previous response."
        }
      },
      "additionalProperties": false,
      "description": "Provide the pagination."
    },
    "project_reference": {
      "type": "string",
      "minLength": 1,
      "description": "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."
    }
  },
  "additionalProperties": false,
  "description": "Arguments for the get_knowledge_graph tool.",
  "$schema": "http://json-schema.org/draft-07/schema#"
}
```

```json title="output-schema.json" theme={null}
{
  "type": "object",
  "properties": {
    "nodes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "file_id": {
            "type": "string",
            "format": "uuid"
          },
          "file_version_id": {
            "type": "string",
            "format": "uuid"
          },
          "path": {
            "type": "string"
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Short human-readable title returned by the tool."
          },
          "type": {
            "type": [
              "string",
              "null"
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of tags associated with this tool result."
          },
          "reserved": {
            "type": "boolean"
          }
        },
        "required": [
          "file_id",
          "file_version_id",
          "path",
          "title",
          "type",
          "tags",
          "reserved"
        ],
        "additionalProperties": false
      },
      "maxItems": 200,
      "description": "Visible knowledge files as nodes. Markdown document links are edges; external and broken links are returned separately. Use the graph to find related files."
    },
    "edges": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "source_file_version_id": {
            "type": "string",
            "format": "uuid"
          },
          "target_file_version_id": {
            "type": "string",
            "format": "uuid"
          },
          "ordinal": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "source_file_version_id",
          "target_file_version_id",
          "ordinal"
        ],
        "additionalProperties": false
      },
      "maxItems": 2000,
      "description": "List of edges associated with this tool result."
    },
    "external_links": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "source_file_version_id": {
            "type": "string",
            "format": "uuid"
          },
          "ordinal": {
            "type": "integer",
            "minimum": 0
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "source_file_version_id",
          "ordinal",
          "url"
        ],
        "additionalProperties": false
      },
      "maxItems": 2000,
      "description": "List of external links associated with this tool result."
    },
    "broken_links": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "source_file_version_id": {
            "type": "string",
            "format": "uuid"
          },
          "ordinal": {
            "type": "integer",
            "minimum": 0
          },
          "target_path": {
            "type": "string"
          }
        },
        "required": [
          "source_file_version_id",
          "ordinal",
          "target_path"
        ],
        "additionalProperties": false
      },
      "maxItems": 2000,
      "description": "List of broken links associated with this tool result."
    },
    "returned_nodes": {
      "type": "integer",
      "minimum": 0
    },
    "total_nodes": {
      "type": "integer",
      "minimum": 0
    },
    "partial": {
      "type": "boolean"
    },
    "links_truncated": {
      "type": "boolean",
      "description": "True when the combined link count or byte budget omits links. The graph is partial."
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 200,
      "description": "Maximum number of results included in this payload."
    },
    "page_info": {
      "type": "object",
      "properties": {
        "self": {
          "type": [
            "string",
            "null"
          ],
          "description": "Cursor supplied on this request, if any."
        },
        "first": {
          "type": "object",
          "description": "Reserved; a first-page cursor is not emitted."
        },
        "next": {
          "type": [
            "string",
            "null"
          ],
          "description": "Opaque cursor for the next page, or null on the last page."
        },
        "prev": {
          "type": "object",
          "description": "Reserved; a previous-page cursor is not emitted."
        }
      },
      "required": [
        "self",
        "first",
        "next",
        "prev"
      ],
      "additionalProperties": false,
      "description": "Pagination cursor values for traversing the result set."
    }
  },
  "required": [
    "nodes",
    "edges",
    "external_links",
    "broken_links",
    "returned_nodes",
    "total_nodes",
    "partial",
    "links_truncated",
    "limit",
    "page_info"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#",
  "description": "Structured result returned by the get_knowledge_graph tool."
}
```

<details>
  <summary>Try this tool</summary>

  Replace sample arguments with values for your project or connected account. Calls run only when you select Run tool.

  MCP tool call

  Call `veryfront__get_knowledge_graph` against the Veryfront MCP endpoint.

  Bearer token or API key

  Arguments (JSON)

  Run tool

  Output JSON

  <pre />
</details>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.