From 163e3c54934b96ac9e46f3d97bb16f79532f06af Mon Sep 17 00:00:00 2001 From: Kyle Rockman Date: Fri, 6 Jun 2025 08:55:22 -0500 Subject: [PATCH 1/2] Add lifecycle and tier --- src/cmd/root.go | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/cmd/root.go b/src/cmd/root.go index d956a10..18b62d1 100644 --- a/src/cmd/root.go +++ b/src/cmd/root.go @@ -31,6 +31,8 @@ type serializedComponent struct { Owner string Url string Level serializedLevel + Lifecycle serializedLifecycle + Tier serializedTier } type serializedInfrastructureResource struct { @@ -47,6 +49,16 @@ type serializedLevel struct { Index int } +type serializedLifecycle struct { + Alias string + Index int +} + +type serializedTier struct { + Alias string + Index int +} + type serializedCheck struct { Id string Name string @@ -168,7 +180,7 @@ var rootCmd = &cobra.Command{ s.AddTool( mcp.NewTool( "components", - 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."), + 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."), mcp.WithToolAnnotation(mcp.ToolAnnotation{ Title: "Components in OpsLevel", ReadOnlyHint: true, @@ -192,6 +204,8 @@ var rootCmd = &cobra.Command{ Framework: node.Framework, Url: node.HtmlURL, Level: serializedLevel{Alias: node.MaturityReport.OverallLevel.Alias, Index: node.MaturityReport.OverallLevel.Index}, + Lifecycle: serializedLifecycle{Alias: node.Lifecycle.Alias, Index: node.Lifecycle.Index}, + Tier: serializedTier{Alias: node.Tier.Alias, Index: node.Tier.Index}, }) } return newToolResult(components, nil) From 5bcfc70c1902cac70b5913d55cbf6365577d3248 Mon Sep 17 00:00:00 2001 From: Kyle Rockman Date: Fri, 6 Jun 2025 09:02:13 -0500 Subject: [PATCH 2/2] add change entry --- .changes/unreleased/Added-20250606-090010.yaml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changes/unreleased/Added-20250606-090010.yaml diff --git a/.changes/unreleased/Added-20250606-090010.yaml b/.changes/unreleased/Added-20250606-090010.yaml new file mode 100644 index 0000000..c4890a3 --- /dev/null +++ b/.changes/unreleased/Added-20250606-090010.yaml @@ -0,0 +1,3 @@ +kind: Added +body: Add Lifecycle and Tier fields to components tool to show component stage and criticality +time: 2025-06-06T09:00:10.181209-05:00