Commit 6bc6027
committed
Fix sos-search-commands tools issue
when output is empty, the Matches slice in SearchCommandsResult was nil.
When marshaled and returned via MCP, this resulted in "matches": null
in the JSON output, causing schema validation failures.
This fix ensures that even when no commands are found, the JSON output
always contains "matches": [] and conforms to the MCP tool schema.
Signed-off-by: Meina-rh <meinli@redhat.com>1 parent 54df8bd commit 6bc6027
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
125 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
126 | 129 | | |
127 | 130 | | |
128 | 131 | | |
| |||
0 commit comments