Skip to content

Commit a7952a8

Browse files
authored
Merge pull request #51 from OpsLevel/kr/add-lifecycle-tier
Add lifecycle and tier
2 parents 7b18f9d + 5bcfc70 commit a7952a8

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
kind: Added
2+
body: Add Lifecycle and Tier fields to components tool to show component stage and criticality
3+
time: 2025-06-06T09:00:10.181209-05:00

src/cmd/root.go

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ type serializedComponent struct {
3131
Owner string
3232
Url string
3333
Level serializedLevel
34+
Lifecycle serializedLifecycle
35+
Tier serializedTier
3436
}
3537

3638
type serializedInfrastructureResource struct {
@@ -47,6 +49,16 @@ type serializedLevel struct {
4749
Index int
4850
}
4951

52+
type serializedLifecycle struct {
53+
Alias string
54+
Index int
55+
}
56+
57+
type serializedTier struct {
58+
Alias string
59+
Index int
60+
}
61+
5062
type serializedCheck struct {
5163
Id string
5264
Name string
@@ -168,7 +180,7 @@ var rootCmd = &cobra.Command{
168180
s.AddTool(
169181
mcp.NewTool(
170182
"components",
171-
mcp.WithDescription("Get all the components in the OpsLevel account. Components are objects in OpsLevel that represent things like apis, libraries, services, frontends, backends, etc. Use this tool to list what components are in the catalog, what team is the owner, what primary coding language is used, and what primary framework is used. It also includes its rubric level, corresponding to the maturity of the component; a higher index is better. A level is achieved by passing all checks tied to that same level."),
183+
mcp.WithDescription("Get all the components in the OpsLevel account. Components are objects in OpsLevel that represent things like apis, libraries, services, frontends, backends, etc. Use this tool to list what components are in the catalog, what team is the owner, what primary coding language is used, and what primary framework is used. It also includes its rubric level, corresponding to the maturity of the component; a higher index is better. A level is achieved by passing all checks tied to that same level. The Lifecycle field indicates the stage of the component (e.g., Alpha, Beta, GA, Decommissioned). The Tier field represents the importance and criticality of the component, with Tier 1 being the most critical (customer-facing with high impact) and Tier 4 being of least importance."),
172184
mcp.WithToolAnnotation(mcp.ToolAnnotation{
173185
Title: "Components in OpsLevel",
174186
ReadOnlyHint: true,
@@ -192,6 +204,8 @@ var rootCmd = &cobra.Command{
192204
Framework: node.Framework,
193205
Url: node.HtmlURL,
194206
Level: serializedLevel{Alias: node.MaturityReport.OverallLevel.Alias, Index: node.MaturityReport.OverallLevel.Index},
207+
Lifecycle: serializedLifecycle{Alias: node.Lifecycle.Alias, Index: node.Lifecycle.Index},
208+
Tier: serializedTier{Alias: node.Tier.Alias, Index: node.Tier.Index},
195209
})
196210
}
197211
return newToolResult(components, nil)

0 commit comments

Comments
 (0)