get_type_dependencies

[architecture]

Analyzes type dependencies (uses / used_by).

Why this tool exists

Project graphs, dependencies, unused references, and complexity are too large to infer reliably from scattered files.

How it helps the agent

The model can reason from architecture-level facts before deleting references, moving code, or prioritizing risky areas.

Parameters

NameTypeRequiredDescription
typeNamestringYesType name to analyze.
projectNamestringNoOptional project name filter.
directionstringNoDirection: 'uses', 'used_by', or 'both' (default).

Examples

Analyze dependencies

Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_type_dependencies",
    "arguments": {
      "typeName": "OrderService"
    }
  }
}
Response
{
  "success": true,
  "data": {
    "typeName": "OrderService",
    "fullName": "Acme.Orders.Services.OrderService",
    "filePath": "/path/to/OrderService.cs",
    "usesCount": 4,
    "usedByCount": 2,
    "uses": [
      {
        "typeName": "ILogger",
        "fullName": "Microsoft.Extensions.Logging.ILogger",
        "namespace": "Microsoft.Extensions.Logging",
        "usageKind": "Field",
        "filePath": null,
        "isExternal": true
      }
    ],
    "usedBy": [
      {
        "typeName": "CheckoutController",
        "fullName": "Acme.Orders.Api.CheckoutController",
        "namespace": "Acme.Orders.Api",
        "usageKind": "Method",
        "filePath": "/path/to/CheckoutController.cs",
        "isExternal": false
      }
    ]
  },
  "error": null
}

Response Notes

Returns types used by the target and types that reference it

↑/↓ NavigateEnter OpenSpace Expand