@@ -6,68 +6,93 @@ namespace DigmaSSEServer.Tools;
6
6
[ McpServerToolType ]
7
7
public class CodeObservabilityTool
8
8
{
9
- [ McpServerTool , Description ( "Get runtime issues for specific code location based on observability analysis" ) ]
9
+ [ McpServerTool ,
10
+ Description ( "Get a list of runtime issues for specific code location based on observability analysis" ) ]
10
11
public static async Task < string > GetCodeInsightsForEnvironment ( DigmaClient client ,
11
- [ Description ( "The name of the method to check, must specify a specific method to check" ) ] string codeMethod ,
12
- [ Description ( "The name of the class. Provide only the class name without the namespace prefix. This is mandatory input" ) ] string codeClass ,
13
- [ Description ( "The namespace of this code location, this is mandatory input" ) ] string codeNamespace ,
14
- [ Description ( "The environment id to check for runtime issues, this is mandatory input" ) ] string environmentId )
12
+ [ Description ( "The name of the method to check, must specify a specific method to check" ) ]
13
+ string codeMethod ,
14
+ [ Description (
15
+ "The name of the class. Provide only the class name without the namespace prefix. This is mandatory input" ) ]
16
+ string codeClass ,
17
+ [ Description ( "The namespace of this code location, this is mandatory input" ) ]
18
+ string codeNamespace ,
19
+ [ Description ( "The environment id to check for runtime issues, this is mandatory input" ) ]
20
+ string environmentId )
15
21
{
16
22
return await client . GetAllIssuesForMethod ( environmentId , codeClass , codeMethod ) ;
17
23
}
18
-
24
+
19
25
[ McpServerTool , Description ( "Get the list of environments and their ids where observability is being analyzed" ) ]
20
26
public static async Task < string > GetEnvironments ( DigmaClient client )
21
27
{
22
28
return await client . GetEnvironments ( ) ;
23
29
}
24
-
25
- [ McpServerTool , Description ( "Get a list of the top runtime issues by analyzing how the code run on specific environment" ) ]
30
+
31
+ [ McpServerTool ,
32
+ Description ( "Get a list of the top runtime issues by analyzing how the code run on specific environment" ) ]
26
33
public static async Task < string > GetTopIssuesByEnvironment ( DigmaClient client ,
27
- [ Description ( "The environment id to check for top issues" ) ] string environmentId ,
28
- [ Description ( "Page number (zero-based)" ) ] int page = 0 ,
29
- [ Description ( "Number of items per page" ) ] int pageSize = 10 )
34
+ [ Description ( "The environment id to check for top issues" ) ]
35
+ string environmentId ,
36
+ [ Description ( "Page number (zero-based)" ) ]
37
+ int page = 0 ,
38
+ [ Description ( "Number of items per page" ) ]
39
+ int pageSize = 10 )
30
40
{
31
41
return await client . GetTopIssues ( environmentId , page , pageSize ) ;
32
42
}
33
-
34
- [ McpServerTool , Description ( "Get a list of the top runtime issues by analyzing how the code run for all environment" ) ]
43
+
44
+ [ McpServerTool ,
45
+ Description ( "Get a list of the top runtime issues by analyzing how the code run for all environment" ) ]
35
46
public static async Task < string > GetTopIssues ( DigmaClient client ,
36
- [ Description ( "Page number (zero-based)" ) ] int page = 0 ,
37
- [ Description ( "Number of items per page" ) ] int pageSize = 10 )
47
+ [ Description ( "Page number (zero-based)" ) ]
48
+ int page = 0 ,
49
+ [ Description ( "Number of items per page" ) ]
50
+ int pageSize = 10 )
38
51
{
39
52
return await client . GetTopIssues ( null , page , pageSize ) ;
40
53
}
41
-
42
- [ McpServerTool , Description ( "Get usage insights for a specific method based on observability analysis" ) ]
54
+
55
+ [ McpServerTool ,
56
+ Description (
57
+ "For this method, see which runtime flows in the application (including other microservices and code not in this project) use this function or method. This data is based on analyzing distributed tracing." ) ]
43
58
public static async Task < string > GetUsagesForMethod ( DigmaClient client ,
44
- [ Description ( "The environment id to check for usages" ) ] string environmentId ,
45
- [ Description ( "The name of the class. Provide only the class name without the namespace prefix." ) ] string codeClass ,
46
- [ Description ( "The name of the method to check, must specify a specific method to check" ) ] string codeMethod )
59
+ [ Description ( "The environment id to check for usages" ) ]
60
+ string environmentId ,
61
+ [ Description ( "The name of the class. Provide only the class name without the namespace prefix." ) ]
62
+ string codeClass ,
63
+ [ Description ( "The name of the method to check, must specify a specific method to check" ) ]
64
+ string codeMethod )
47
65
{
48
66
return await client . GetUsagesForMethod ( environmentId , codeClass , codeMethod ) ;
49
67
}
50
-
51
- [ McpServerTool , Description ( "Get the list of asset categories by environment available for performance insights based on observability analysis" ) ]
52
- public static async Task < string > GetAssetCategories ( DigmaClient client ,
53
- [ Description ( "The environment id to get assets cetegories" ) ] string environmentId )
68
+
69
+ [ McpServerTool , Description ( "Get the list of asset categories available in a specific environment" ) ]
70
+ public static async Task < string > GetAssetCategories ( DigmaClient client ,
71
+ [ Description ( "The environment id to get assets cetegories" ) ]
72
+ string environmentId )
54
73
{
55
74
return await client . GetAssetCategories ( environmentId ) ;
56
75
}
57
-
58
- [ McpServerTool , Description ( "Get the execution trace for a specific runtime issue based on observability analysis" ) ]
59
- public static async Task < string > GetTrace ( DigmaClient client ,
60
- [ Description ( "The trace id to get trace json" ) ] string traceId )
76
+
77
+ [ McpServerTool , Description ( "Get an observability trace sample for a specific runtime issue" ) ]
78
+ public static async Task < string > GetTrace ( DigmaClient client ,
79
+ [ Description ( "The trace id to get trace json, the trace id is found in the issue details" ) ]
80
+ string traceId )
61
81
{
62
82
return await client . GetTrace ( traceId ) ;
63
83
}
64
-
65
- [ McpServerTool , Description ( "Get code assets filtered by performance impact and category based on observability analysis" ) ]
66
- public static async Task < string > GetAssetsByCategory ( DigmaClient client ,
67
- [ Description ( "The environment id to get assets categories" ) ] string environmentId ,
68
- [ Description ( "Asset category to filter assets. Optional" ) ] string ? assetCategory = null ,
69
- [ Description ( "Page number (zero-based)" ) ] int page = 0 ,
70
- [ Description ( "Number of items per page" ) ] int pageSize = 10 )
84
+
85
+ [ McpServerTool ,
86
+ Description (
87
+ "Find out what affects performance in the application the most. Returns a list of assets (can be code locations, endpoints, database queries etc.) and their performance impact, which is measured by the time cost of exeecuting these assets." ) ]
88
+ public static async Task < string > GetTopPerformanceImpactingAssets ( DigmaClient client ,
89
+ [ Description ( "The environment id" ) ] string environmentId ,
90
+ [ Description ( "The asset category name" ) ]
91
+ string ? assetCategory = null ,
92
+ [ Description ( "Page number (zero-based)" ) ]
93
+ int page = 0 ,
94
+ [ Description ( "Number of items per page" ) ]
95
+ int pageSize = 10 )
71
96
{
72
97
return await client . GetAssetsByCategory ( environmentId , assetCategory , page , pageSize ) ;
73
98
}
0 commit comments