Skip to content

Commit 18aeb0f

Browse files
return literal
1 parent bc2e18c commit 18aeb0f

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/cmd/root.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,10 @@ var rootCmd = &cobra.Command{
173173
),
174174
func(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolResult, error) {
175175
searchTerm := ""
176-
testVal := req.Params.Arguments["searchTerm"]
177176
if req.Params.Arguments["searchTerm"] != nil {
178177
searchTerm = req.Params.Arguments["searchTerm"].(string)
179178
}
180-
variables := getListDocumentPayloadVariables(testVal)
179+
variables := getListDocumentPayloadVariables(searchTerm)
181180
resp, err := client.ListDocuments(&variables)
182181
return newToolResult(resp.Nodes, err)
183182
})
@@ -281,11 +280,9 @@ func setupLogging() {
281280
}
282281

283282
func getListDocumentPayloadVariables(searchTerm string) opslevel.PayloadVariables {
284-
variables := opslevel.PayloadVariables{
283+
return opslevel.PayloadVariables{
285284
"searchTerm": searchTerm,
286285
"after": "",
287286
"first": 100,
288287
}
289-
290-
return variables
291288
}

0 commit comments

Comments
 (0)