Skip to content

Commit 1cd5b73

Browse files
committed
updated tool descriptions
1 parent 05c6684 commit 1cd5b73

File tree

1 file changed

+60
-35
lines changed

1 file changed

+60
-35
lines changed

src/DigmaSSEServer/Tools/CodeObservabilityTool.cs

Lines changed: 60 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,68 +6,93 @@ namespace DigmaSSEServer.Tools;
66
[McpServerToolType]
77
public class CodeObservabilityTool
88
{
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")]
1011
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)
1521
{
1622
return await client.GetAllIssuesForMethod(environmentId, codeClass, codeMethod);
1723
}
18-
24+
1925
[McpServerTool, Description("Get the list of environments and their ids where observability is being analyzed")]
2026
public static async Task<string> GetEnvironments(DigmaClient client)
2127
{
2228
return await client.GetEnvironments();
2329
}
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")]
2633
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)
3040
{
3141
return await client.GetTopIssues(environmentId, page, pageSize);
3242
}
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")]
3546
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)
3851
{
3952
return await client.GetTopIssues(null, page, pageSize);
4053
}
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.")]
4358
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)
4765
{
4866
return await client.GetUsagesForMethod(environmentId, codeClass, codeMethod);
4967
}
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)
5473
{
5574
return await client.GetAssetCategories(environmentId);
5675
}
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)
6181
{
6282
return await client.GetTrace(traceId);
6383
}
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)
7196
{
7297
return await client.GetAssetsByCategory(environmentId, assetCategory, page, pageSize);
7398
}

0 commit comments

Comments
 (0)