get_type_dependencies
[architecture]
Analyzes type dependencies. uses inspects base types, interfaces, fields, properties, method returns, and parameters. It omits method-body usages and filters most System types. used_by follows symbol references. This is not a complete dependency inventory.
Try it locally in the Glider playground
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| symbolKey | string | No | Source type key from discovery. Do not combine with typeName or projectName. |
| typeName | string | No | Type name. Provide this or symbolKey. |
| projectName | string | No | Optional project name filter. |
| direction | string | No | Direction: 'uses', 'used_by', or 'both' (default). Default: "both" |
| responseDetail | string | No | compact returns results and actionable state. full adds diagnostic metadata under responseDiagnostics. Default: "compact" |
Examples
Replace sample paths and symbol keys with values from your workspace.
Analyze dependencies
{
"typeName": "OrderService"
}Full MCP request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_type_dependencies",
"arguments": {
"typeName": "OrderService"
}
}
}{
"success": true,
"typeName": "OrderService",
"symbolKey": "<type key from find_code>",
"fullName": "Acme.Orders.Services.OrderService",
"filePath": "/path/to/OrderService.cs",
"usesCount": 4,
"usedByCount": 2,
"uses": [
{
"typeName": "ILogger",
"symbolKey": null,
"fullName": "Microsoft.Extensions.Logging.ILogger",
"namespace": "Microsoft.Extensions.Logging",
"usageKind": "Field",
"filePath": null,
"isExternal": true
}
],
"usedBy": [
{
"typeName": "CheckoutController",
"symbolKey": "<source dependency key>",
"fullName": "Acme.Orders.Api.CheckoutController",
"namespace": "Acme.Orders.Api",
"usageKind": "Method",
"filePath": "/path/to/CheckoutController.cs",
"isExternal": false
}
]
}Analyze a discovered type
{
"symbolKey": "<type key from find_code>",
"direction": "both"
}Full MCP request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_type_dependencies",
"arguments": {
"symbolKey": "<type key from find_code>",
"direction": "both"
}
}
}Response Notes
Returns types used by the target and types that reference it. The target and source dependency records include symbolKey. External dependency keys are null. Keys select source types only; absent, metadata, and non-type keys fail. Results use top-level fields with success. Compact is the default; full adds responseDiagnostics. Both modes retain errors, coverage, partial state, and recovery advice.
For a failed symbol-key request, success=false includes errorCode, parameter, error, and suggestions in compact, full, and batch operation results. Batch keeps a bounded summary outside the requested detail budget. If the hard server limit omits details, failureDetailsOmitted or writeStateOmitted identifies the omission. errorCode is invalid_symbol_key, symbol_not_found, ambiguous_symbol_key, wrong_symbol_kind, source_unavailable, unsupported_symbol, or invalid_arguments. Follow the suggestions for the specific failure. Correct the named selector for invalid_arguments. For symbol_not_found, repeat discovery in the selected workspace and pass a returned key unchanged. An absent identity does not prove that a key is stale.