Skip to content

Commit fcfacc4

Browse files
committed
fix: parse new kind: toolset config format for validation
The upstream prebuilt config moved from a top-level toolsets: block to per-toolset YAML documents (kind: toolset / name:) in toolbox v1.2.0. The old awk parser found zero toolsets on v1.2.0+, so the validation passed vacuously. Parse the new format so unsupported upstream toolsets are detected.
1 parent 94f0848 commit fcfacc4

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/scripts/generate_skills.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@ RAW_URL="https://raw.githubusercontent.com/googleapis/mcp-toolbox/v${VERSION}/in
5454
echo "Fetching upstream config from: $RAW_URL"
5555
UPSTREAM_YAML=$(curl -sL --fail "$RAW_URL" || { echo "Error: Could not fetch upstream YAML for v$VERSION"; exit 1; })
5656

57-
# Extract the list of toolsets
58-
UPSTREAM_TOOLSETS=$(echo "$UPSTREAM_YAML" | awk '/^toolsets:/{flag=1; next} flag && /^ [a-zA-Z0-9_-]+:/{print $1}' | sed 's/://g')
57+
# Extract the list of toolsets. Each toolset is its own YAML document:
58+
# kind: toolset
59+
# name: <toolset>
60+
UPSTREAM_TOOLSETS=$(echo "$UPSTREAM_YAML" | awk '$1=="kind:" && $2=="toolset"{f=1; next} f && $1=="name:"{print $2; f=0}')
5961

6062
# Compare upstream toolsets against our supported list
6163
MISSING_TOOLSETS=false

0 commit comments

Comments
 (0)