Skip to content

Commit 32806c8

Browse files
Merge pull request #44 from OpsLevel/language-framework-in-list-components
include Language and Framework in components list tool
2 parents fc7b0eb + c7371d6 commit 32806c8

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
kind: Added
2+
body: Add Language & Framework to the components tool directly, so it is listed without
3+
additional calls to `resourceDetails`
4+
time: 2025-05-27T07:41:11.365169-07:00

src/cmd/root.go

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@ import (
2424
var defaultSystemPrompt string
2525

2626
type serializedComponent struct {
27-
Id string
28-
Name string
29-
Owner string
30-
Url string
27+
Id string
28+
Framework string
29+
Language string
30+
Name string
31+
Owner string
32+
Url string
3133
}
3234

3335
type serializedInfrastructureResource struct {
@@ -165,7 +167,7 @@ var rootCmd = &cobra.Command{
165167
s.AddTool(
166168
mcp.NewTool(
167169
"components",
168-
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."),
170+
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."),
169171
mcp.WithToolAnnotation(mcp.ToolAnnotation{
170172
Title: "Components in OpsLevel",
171173
ReadOnlyHint: true,
@@ -182,10 +184,12 @@ var rootCmd = &cobra.Command{
182184
var components []serializedComponent
183185
for _, node := range resp.Nodes {
184186
components = append(components, serializedComponent{
185-
Id: string(node.Id),
186-
Name: node.Name,
187-
Owner: node.Owner.Alias,
188-
Url: node.HtmlURL,
187+
Id: string(node.Id),
188+
Name: node.Name,
189+
Owner: node.Owner.Alias,
190+
Language: node.Language,
191+
Framework: node.Framework,
192+
Url: node.HtmlURL,
189193
})
190194
}
191195
return newToolResult(components, nil)

0 commit comments

Comments
 (0)