You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: internal/reportportal/items.go
+71-1Lines changed: 71 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@ import (
12
12
"github.com/mark3labs/mcp-go/mcp"
13
13
"github.com/mark3labs/mcp-go/server"
14
14
"github.com/reportportal/goRP/v5/pkg/gorp"
15
+
"github.com/reportportal/goRP/v5/pkg/openapi"
15
16
"github.com/yosida95/uritemplate/v3"
16
17
)
17
18
@@ -25,11 +26,13 @@ type TestItemResources struct {
25
26
funcNewTestItemResources(
26
27
client*gorp.Client,
27
28
analytics*Analytics,
29
+
projectstring,
28
30
) *TestItemResources {
29
31
return&TestItemResources{
30
32
client: client,
31
33
projectParameter: mcp.WithString("project", // Parameter for specifying the project name)
32
34
mcp.Description("Project name"),
35
+
mcp.DefaultString(project),
33
36
),
34
37
analytics: analytics,
35
38
}
@@ -626,7 +629,8 @@ func (lr *TestItemResources) toolGetProjectDefectTypes() (mcp.Tool, server.ToolH
626
629
"get_project_defect_types",
627
630
// Tool metadata
628
631
mcp.WithDescription(
629
-
"Get all defect types for a specific project, returns a JSON which contains a list of defect types in the 'configuration/subtypes' array",
632
+
"Get all defect types for a specific project, returns a JSON which contains a list of defect types in the 'configuration/subtypes' array and represents the defect type ID. "+
633
+
"Example: { \"NO_DEFECT\": { \"locator\": \"nd001\" } NO_DEFECT - defect type name, nd001 - defect type unique id }, ",
mcp.WithDescription("Update test item defect type"),
659
+
lr.projectParameter,
660
+
mcp.WithArray("test_item_ids", // Parameter for specifying the array of test item IDs
661
+
mcp.Description("Array of test item IDs"),
662
+
mcp.Required(),
663
+
),
664
+
mcp.WithString(
665
+
"defect_type_id", // Parameter for specifying the defect type ID
666
+
mcp.Description(
667
+
"Defect Type ID, all possible values can be received from the tool 'get_project_defect_types', \"locator\" is a unique identifier of the defect type. "+
668
+
"Example: \"NO_DEFECT\": { \"locator\": \"nd001\" } NO_DEFECT - defect type name, nd001 - defect type unique id",
0 commit comments