get_project_graph

[architecture]

Analyzes the loaded workspace at the project-reference level. Returns direct edges, roots/leaves, transitive reachability, and cycle groups for architecture review.

Try this tool in Playground.

Parameters

NameTypeRequiredDescription
projectNamestringNoOptional project name to focus reachability details.
includeTransitivebooleanNoInclude transitive dependency/dependent counts and focused reachability lists. Default is true.
includeCyclesbooleanNoInclude detected cycle groups. Default is true.
includeEdgesbooleanNoInclude the explicit direct edge list. Default is true.
pathStylestringNoPath style: 'absolute' (default) or 'relative' (to solution root).

Examples

Inspect the full project graph

Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_project_graph",
    "arguments": {}
  }
}
Response
{
  "success": true,
  "data": {
    "projectCount": 3,
    "edgeCount": 2,
    "roots": [
      "MyProject.Web"
    ],
    "leaves": [
      "MyProject.Data"
    ],
    "edges": [
      {
        "fromProject": "MyProject.Web",
        "toProject": "MyProject.Core"
      },
      {
        "fromProject": "MyProject.Core",
        "toProject": "MyProject.Data"
      }
    ],
    "cycleGroups": [],
    "focus": {
      "projectName": "MyProject.Web",
      "transitiveDependencies": [
        "MyProject.Core",
        "MyProject.Data"
      ],
      "transitiveDependents": []
    }
  },
  "error": null
}

Focus on one project

Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_project_graph",
    "arguments": {
      "projectName": "MyProject.Web"
    }
  }
}
Response
{
  "success": true,
  "data": {
    "projectCount": 3,
    "edgeCount": 2,
    "roots": [
      "MyProject.Web"
    ],
    "leaves": [
      "MyProject.Data"
    ],
    "edges": [
      {
        "fromProject": "MyProject.Web",
        "toProject": "MyProject.Core"
      },
      {
        "fromProject": "MyProject.Core",
        "toProject": "MyProject.Data"
      }
    ],
    "cycleGroups": [],
    "focus": {
      "projectName": "MyProject.Web",
      "transitiveDependencies": [
        "MyProject.Core",
        "MyProject.Data"
      ],
      "transitiveDependents": []
    }
  },
  "error": null
}

Response Notes

Returns project nodes, direct edges, roots/leaves, cycles, and optional focused reachability data